在雙嵌套陣列MongoDB中查找我在MongoDB有這個收藏{"_id" : "777","someKey" : "someValue","someArray" : [
{
"name" : "name1",
"someNestedArray" : [
{
"name" : "value"
},
{
"name" : "delete me"
}
]
}
]}我想要基于某個Array.omeNestedArray.name的文檔,但是我找不到任何有用的鏈接,所有關于更新嵌套數組的搜索結果,我正在嘗試,但什么也不返回db.mycollection.find({"someArray.$.someNestedArray":{"$elemMatch":{"name":"1"}}})db.mycollection.find({"someArray.$.someNestedArray.$.name":"1"})還有其他的事情如何在雙嵌套數組MongoDB中找到BY元素?
在雙嵌套陣列MongoDB中查找
慕的地6264312
2019-06-11 20:32:54