0

Image with the database example

Hi guys i have trouble to select the name="Clothing" i have tried .find and element Match but i cannot make it work... Can anyone help?

Daniel
  • 11
  • 5

1 Answers1

0

The syntax should be db.yourCollection.find( {"categories.name": "Clothing"} )

Read the mongodb documentation, it's great !

https://docs.mongodb.com/manual/reference/method/db.collection.find/

Alice
  • 972
  • 1
  • 7
  • 17