小编Anj*_*Rao的帖子

ArangoDB AQL:更新嵌入式阵列中的单个对象

我试图使用AQL更新嵌入式数组中的json文档的属性.如何使用下面的AQL更新"home"类型地址的"地址线"?

用户:

{
name: "test",
address: [
      {"addressline": "1234 superway", type:"home"}, 
      {"addressline": "5678 superway", type:"work"}
     ]
}
Run Code Online (Sandbox Code Playgroud)

到目前为止AQL尝试

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

arangodb

9
推荐指数
2
解决办法
2707
查看次数

标签 统计

arangodb ×1