我有一个像这样的数据结构:
Post
{
'id': $_id,
'user' : ['first_name' : 'Joe', 'last_name' : 'Devon' ],
'text' : 'blah',
'comment' :
['first' : 'Joe', 'last' : 'Devon', 'comment' : 'hello'],
['first' : 'John', 'last' : 'Smith', 'comment' : 'bye', 'hidden' : true],
['first' : 'Joe', 'last' : 'Devon', 'comment' : 'world']
},
{
'id': $_id,
'user' : ['first_name' : 'Joe', 'last_name' : 'Shmoe' ],
'text' : 'meh',
'comment' :
['first' : 'Joe', 'last' : 'Devon', 'comment' : 'sup'],
},
{
'id': $_id,
'user' : ['first_name' : 'Mr.', 'last_name' : 'Smith' ],
'text' : 'bah',
'comment' :
['first' : 'Joe', 'last' : 'Devon', 'comment' : 'sup mon'],
}
我正在尝试运行一个查询,该查询将返回除具有“隐藏”的评论之外的所有内容:true。
尝试了所有不起作用的方法。寻找一个可行的命令。请帮忙 :)