Answer the question
In order to leave comments, you need to log in
What is the best way to search to create conversations in MongoDb?
I have an array of messages. From it, an array of id of those people with whom the user is corresponding is formed. In order to form a page of correspondence, I need to select people from the database and take some data I need about each of them. ( avatar, name, status: online, online, ...... )
What is the best way to search?
in one gulp
User.find({_id: {$in: dialogPersons}}, function(err, persons)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question