我试图使用AQL更新嵌入式数组中的json文档的属性.如何使用下面的AQL更新"home"类型地址的"地址线"?
{
name: "test",
address: [
{"addressline": "1234 superway", type:"home"},
{"addressline": "5678 superway", type:"work"}
]
}
Run Code Online (Sandbox Code Playgroud)
for u in users
for a in u.address
FILTER a.type='home'
UPDATE u WITH {<What goes here to update addressline?>} in users
Run Code Online (Sandbox Code Playgroud)
感谢您的帮助.
此致,Anjan
给出以下示例收集文档:
{
"timestamp": 1413543986,
"message": "message",
"readed": {
"8": null,
"9": null,
"22": null
},
"type": "1014574149174"
}
Run Code Online (Sandbox Code Playgroud)
如何使用"readed"键更新对象中特定键的值?例如,键"8"的更新值:
...
"8": 10,
...
Run Code Online (Sandbox Code Playgroud)