我想要一个查询来从嵌入在object中的字符串数组中获取文档。
{
"_id" : "3YKncXW8jGYqBG2zx",
"roles" : {
"public" : [
"dashboard"
],
"private" : [
"Sanity",
"run_api",
"Dashboard"
]
}
}
{
"_id" : "nwS84s8bHNdS7N2vh",
"roles" : {
"private" : [
"Sanity",
"run_api",
"Dashboard"
]
}
}
db.getCollection('rolesCollection').find({roles : {"private" : [ "Sanity", "run_api" , "Dashboard" }})
0个文件。
3YKncXW8jGYqBG2zx
nwS84s8bHNdS7N2vh
有人可以帮助我获取private
数组元素"Sanity", "run_api" and "Dashboard"
的文档_id