Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

monngoose find from an array using in

//e.g. : There's an array of Team Ids which needs to find documents from db
Team.find({
    '_id': { $in: teamIds.split(',') }
}, function(err, teamData) {
    console.log("teams name  " + teamData);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #monngoose #find #array
ADD COMMENT
Topic
Name
5+8 =