Reputation: 299
I want to query all child objects filtering them by one field inside of child object.
For example:
{
"_id" : ObjectId("61a8adfc153b52805029b694"),
"date" : "2021-12-02T11:29:00.724Z",
"playerOne" : {
"trophies" : 8,
"isBot" : true
}
}
How can i get _id of a document which playerOne child object has more than 100 trophies. Or 5 or less trophies for example.
Upvotes: 0
Views: 79