【发布时间】:2015-10-28 06:06:53
【问题描述】:
这是我的 RethinkDB 表中的示例行。
{
"a1": "val1" ,
"a2": "val2" ,
"a3": "val3" ,
"a4": "val4" ,
"part": [
{
"id": "reql" ,
"position": "student"
} ,
{
"id": "sdsadda" ,
"position": "officer"
}
] ,
"a5": "val5"
}
我想访问一个嵌套的 json 对象,但我收到错误 e: Cannot perform bracket on a non-object non-sequence "string"
我需要输出中的整行匹配 id 到“reql”的行
这是我的查询
r.db('dbname').table('tablename').filter(r.row('part').contains(function(product) {
return product('id').eq("reql");
}))
此查询以前有效。现在无效。
【问题讨论】:
标签: rethinkdb