I would like to obtain a document with a key of "0001" (first and third)
in the following documents.
However, the nested depth of the value of "0001" is not unique.
db.collection.find({"0001":wildcard})
I'm wondering if it's designated like this, but it doesn't work.
Please let me know.
{
"0001": {"test1":"AAA"}
},
{
"0002": {"test2": {"BBB": {"bbb": "ooo"}
},
{
"0001": {"test3": {"CCC": "ccc"}}
}
db.collection.find({"0001":{$exists:true}})
You'll get the results you're looking forward to!
© 2024 OneMinuteCode. All rights reserved.