find by id mongoose node js code example
Example: find one with specofoc id mongoose
YOUR_MODEL_NAME.findOne({_id: reqParameterID}, function(err, result) {
if (err) {
console.log(err);
} else {
// Do Something
}
});
YOUR_MODEL_NAME.findOne({_id: reqParameterID}, function(err, result) {
if (err) {
console.log(err);
} else {
// Do Something
}
});