Here is a sample document I am trying to update:
{
"id": "123",
"subIds": [
{
"subId": "562"
}
],
"instructions": [
{
"payments": [
{
"transactions": [
{
"id": 1,
"flag": false
},
{
"id": 2,
"flag": false
}
]
}
]
}
]
}
currently I modify the flag
field with the following query :
UPDATE order AS o
USE KEYS ["123"]
SET tr.flag = true
FOR tr IN ARRAY_FLATTEN(ARRAY_FLATTEN(instructions[*].payments,1)[*].transactions,1)
WHEN tr.id IN [1, 2] END;
Currently I search for documents to be modified only by the id
field, I would like to add the possibility of also searching by subIds[*].subId
in a list of values ​​(for example ["562"]
)
Can you help me please ?