Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose find multiple conditions

User.find({$or:[{region: "NA"},{sector:"Some Sector"}]}, function(err, user) 
 {
    if (err)
    {
        res.send(err);
    }
    console.log(user);
    res.json(user);

 });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongoose #find #multiple #conditions
ADD COMMENT
Topic
Name
9+2 =