-
Type: Task
-
Resolution: Done
-
Priority: Blocker - P1
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Hi Team,
Wanted to check if we are using the following query to serve the purpose is it valid?
Let's suppose I have two documents as given below.
{
"_id": ObjectID('123'),
"test":
},
{
"_id": ObjectID('456'),
"test":
I wanted to identify if there are any other keys present in the test object other than
"a", so I went for some solution and following worked for me.
db.col.find({"test": {"$gt":
}})
But I did not found any such case over the MongoDB official documentation to search on the JSON object, so should we consider it to use?
This is useful as we can do the index on the test object, which will improve the query performance.
Thanks.
- is duplicated by
-
SERVER-56139 JSON based query to identify if there are any other field present apart from provided one
- Closed