What wrong with this query?

db.listingsAndReviews.find({“accommodates”: {$gt: 6}}, {“number_of_reviews”: {$eq: 50}})

Curly braces and square brackets make MQL so confusing and frustrating.

Hello @eddie_2009, welcome to the MongoDB Community forum!

In case you are trying to query based on the conditions that "accommodates": { $gt: 6 } and "number_of_reviews": { $eq: 50 }, then the following will do:

db.listingsAndReviews.find(
    { 
      "accommodates": { $gt: 6 },
      "number_of_reviews": 50
    }
) 

Little bit of formatting can show your code clearly. Try using straight quotes (single or double). Finally, in MQL, $eq can be omitted in this case.

Thanks for the solution. I use simple double quotes. Upon pasting here, they’re appearing differently.