MongoDB equivalent to WHERE IN (1,2, ...)

I have a list of user IDs and I want to pull each document (naturally ordered) from the collection associated with one of these user IDs. Is there an equivalent to MongoDB SQL WHERE IN?

+5
source share
1 answer

Yes, use the Mongo $inoperator .

+8
source