Useful Mongoose functions

suggest change

Mongoose contains some built in functions that build on the standard find().

doc.find({'some.value':5},function(err,docs){
    //returns array docs
});

doc.findOne({'some.value':5},function(err,doc){
    //returns document doc
});

doc.findById(obj._id,function(err,doc){
    //returns document doc
});

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents