Below is my json doc;
Bucket: Default:
“channel”: “CON”,
“dtype”: “coninf”,
“con_info”: [
{
“partners”: [
{
“id”: “AIRTEL”,
“name”: “Airtel Corporation Inc”
},
{
“id”: “Snapchat”,
“name”: “Snapchat Inc”
}
],
I want to upate name inside partners array on the basis of name and dtype.
This is my query which fails to update:
UPDATE Default
SET s.id=“Test13” FOR s IN ARRAY_FLATTEN(con_info[*].partners, 1)END
WHERE dtype = ‘coninf’ and s.name=‘Airtel Corporation Inc’.
Please suggest.
Thanks
Ritu