Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

finding in mongoose using a name

var name = 'Peter';
model.findOne({name: new RegExp('^'+name+'$', "i")}, function(err, doc) {
  //Do your action here..
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #finding #mongoose
ADD COMMENT
Topic
Name
2+7 =