How to copy a key value from one doc to other doc from same bucket

UPDATE Bucket_Name a SET codes = (SELECT RAW codes FROM Bucket_Name b WHERE type = “air” AND package= “Extra”)[0] WHERE type = “air” AND package = “Blue”;

I was able to execute , with above query

You can use one you suggested.

https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/update.html
https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/merge.html
INSERT INTO SELECT https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/insert.html

Give the example of document and output. What is Join criteria.