How to update many values in object and get modifying object

I have a document, for example

{
  "data": {
    "en": {
      "planets": "Mars"
    },
    "ru": {
      "planets": "Venera"
    },
    "sv": {
      "planets": "Upiter",
       "location": { 
     "x":0,
"y":o
}
    }
  },
  "_scope": "test",
  "_type": "Planets",
  "account_id": "f4653c87-bb59-4083-a600-e5acba2fd301",
  "stamp": 1605646474771,
  "id": "0de3c6d6-29aa-471d-8888-824abc479b75"
} 

I need to change document values from subquery

for example
data": {
“en”: {
“planets”: “Mars 1”,
“location”: {
“x”:1231542,
“y”:613451345
}
},
“ru”: {
“planets”: “Venera 2”,
“location”: {
“x”:1231542,
“y”:613451345
}
},
“sv”: {
“planets”: “Upiter 3”,
“location”: {
“x”:1231542,
“y”:613451345
}
}
},

and upsert it to the another backet

I have tried object_put, but I do not know how to put many objects in one query and get full document result, that I could uprest in another backet?

I looking for help.

Follow this Find data from documets wich have keys which I chose from another select

If you still need help post both the documents and result document.

In this case I can changing only one object
OBJECT_PUT(d.data,"en",OBJECT_PUT(d.data.en,"booksSelect"bs))

But I need change many

 OBJECT_PUT(d.data,"en",OBJECT_PUT(d.data.en,"booksSelect", bs.en)) ,
 OBJECT_PUT(d.data,"en",OBJECT_PUT(d.data.ru,"booksSelectRU", bs.ru)) 
 OBJECT_PUT(d.data,"en",OBJECT_PUT(d.data.ым,"booksSelectSV", bs.sv)) 
AND i want to get the resulting document with these changes
OBJECT_CONCAT(d.data, {"en":OBJECT_PUT(d.data.en,"booksSelect", bs.en) ,
                       "ru":OBJECT_PUT(d.data.ru,"booksSelectRU", bs.ru),
                       "sv":OBJECT_PUT(d.data.sv,"booksSelectSV", bs.sv) })

I have a similar usecase for updating inside an object.

{
	"rootField": {
		"a": {"commonField": "value1"},
		"b": {"commonField": "value1"},
		"c": {"commonField": "value2"}
	}
}

I want to iterate over all key-objects inside rootField and when commonField="value1", I want to instead have with commonField="value1.1". Is this possible for Couchbase Server 6.5?

Note: I have no previous knowledge of what fields a, b, c can be, and have to write my query accordingly

I wrote an UPDATE query I thought would work, but gives an error

UPDATE <<bucket_name>>
USE KEYS <<keys>>
SET rootField.[fieldKey].commonField = "value1.1" FOR fieldKey IN (
    ARRAY elem.name FOR elem IN OBJECT_INNER_PAIRS(rootField) WHEN elem.val.commonField = "value1" END
);
UPDATE <<bucket_name>>
USE KEYS <<keys>>
SET v.commonField = "value1.1" FOR v WITHIN rootField WHEN v.commonField = "value1" END;

It worked, thanks!! There is no documentation to suggest that WITHIN iteration works for objects. It might be worthwhile to add the same.