@edmond_brakus You can use the find() method and the dot notation to query for objects inside objects in MongoDB. The syntax looks like this:
1
|
db.collection.find({"object.key": value}) |
Where "object" is the name of the parent object, "key" is the key inside of the parent object, and value is the value that you are searching for. For example, if you have a collection of users, and each user has an "address" object which contains information about their address, you could search for all users who live in a certain city like this:
1
|
db.users.find({"address.city": "New York"}) |