I'm trying to perform a simple find using MongoDB, I'm new on it, so I don't know what is wrong, but it seems that it's always bringing all the results without filtering it.
You can run the code here and see what is happening: https://mongoplayground.net/
Collection - Paste it here https://mongoplayground.net/ - FIRST Text Area
[
  {
    "collection": "collection",
    "count": 10,
    "content": [
      {
        "_id": "apples",
        "qty": 5
      },
      {
        "_id": "bananas",
        "qty": 7
      },
      {
        "_id": "oranges",
        "qty": {
          "in stock": 8,
          "ordered": 12
        }
      },
      {
        "_id": "avocados",
        "qty": "fourteen"
      }
    ]
  }
]Find - Paste it here https://mongoplayground.net/ - SECOND Text Area
db.collection.find({
  "content.qty": 5
})Check the results and you will see the entire JSON as a result. What Am I doing wrong? Thanks!
 
     
    