I have a list of userIDs and I want to pull out every document (naturally ordered) from a collection that are associated with one of these user IDs. Is there a MongoDB equivalent of the SQL WHERE IN?
Yes, use Mongo's $in
operator.
I have a list of userIDs and I want to pull out every document (naturally ordered) from a collection that are associated with one of these user IDs. Is there a MongoDB equivalent of the SQL WHERE IN?
Yes, use Mongo's $in
operator.
精彩评论