Skip to content

Instantly share code, notes, and snippets.

@wytten
Created March 26, 2014 18:28
Show Gist options
  • Select an option

  • Save wytten/9790018 to your computer and use it in GitHub Desktop.

Select an option

Save wytten/9790018 to your computer and use it in GitHub Desktop.
MongoDB dot notation
db.catalog.find({price:{$gt:10000}, "reviews.rating":{$gte:5}})
@wytten

wytten commented Mar 26, 2014

Copy link
Copy Markdown
Author

Note that the above won't work if you remove the double quotes around reviews.rating, apparently because the JavaScript interpreter gets confused by the '.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment