例如,我有两个文件:
{
communication: "some data 1"
users: [
{
name: 'Peter',
role: 'admin'
gender: 'male'
},
{
name: 'John',
role: 'guest'
gender: 'male'
}
]
}
{
communication: "some data 2"
users: [
{
name: 'Kollins',
role: 'admin'
gender: 'male'
},
{
name: 'Steve',
role: 'moderator'
gender: 'male'
}
]
}
最后,我必须获取users
数组中没有user
with的文档role: 'guest'
。基于两个文档的示例,我必须获得第二个文档。伪代码如下:
select * from bucket where users.role = 'guest' is missing