Reputation: 15519
Say I have the following object:
{
players: [{_id: "someid"}]
}
How can I query this collection for all objects that have an object in players
that has the _id
of someid
?
Upvotes: 0
Views: 63
Reputation: 230521
db.collection.find({'players._id': 'someid'})
It's called dot notation.
Upvotes: 1