Hi
Is there any way, where
- i can compare and update all the JSONArrayDocuments in bucket1 with the elements in bucket2, which has same keys…
and - at the same time if key dont exist in bucket 1, it should upsert/ insert the new key and respective JSONArrayDocument content from bucket2 to bucket1. Any N1QL query for that?
Example:
Bucket-1
Document key:1111
Content:
[{field1:000,field2:111},{field1:222,field2:333}]
Bucket-2
1st record in bucket-2
Document key:1111
Content:
[{field1:000,field2:aaa},{field1:ddd, field2:eee}]
2nd record in bucket-2
Document key:2222
Content:
[{field1:000,field2:aaa},{field1:ddd, field2:eee}]
so if i execute a N1QL query the bucket-1 should get updated as follows:
1st record in bucket-1
Document key:1111
Content:
[{field1:000,field2:aaa},{field1:ddd, field2:eee},{field1:222,field2:333}]
2nd record in bucket-1
Document key:2222
Content:
[{field1:000,field2:aaa},{field1:ddd, field2:eee}]