I am working with MongoDB documents formatted like this:
{
"_id": ObjectId("5406e4c49b324869198b456a"),
"phones": {
"12035508684": 1,
"13399874497": 0,
"15148399728": 1,
"18721839971": 1,
"98311321109": -1,
}
}
The phones field consists of a hash of phone numbers and their frequency of use.
I am trying to select all documents that have at least one phone number with a frequency of zero or less.
I attempted the following query:
db.my_collection.find({"phones": { $lte: 0} })
Unfortunately, this query did not return the desired results.
Thank you in advance for any advice you can provide.