Answers for "mongoose find multiple queries"

0

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);

 });
Posted by: Guest on July-30-2020
0

how to add multiple qurery in mongoose find method

app.get('/user',function(req, res) {

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

 });
});
Posted by: Guest on May-13-2021
0

how to add multiple qurery in mongoose find method

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

 });
Posted by: Guest on May-13-2021

Code answers related to "mongoose find multiple queries"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language