I have an array structures as such
I've been trying to use an aggregation pipeline, and bulk.find() with a loop, and the $in operator, and none of these options seem to give me the power to (find many by an array of inputted id's). How do you find many objects in an array filtering by an array of ID's that I already have? I'm using PyMongo
Using an aggregation pipeline, use an $in match after unwinding
[
{$unwind: "groups.asana"},
{"source_id": {$in: ["id1", "id2", "id3"]}}
]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.