Snippets Collections
   var Person = mongoose.model('Person', yourSchema);
   // find each person with a name contains 'Ghost'
   Person.findOne({ "name" : { $regex: /Ghost/, $options: 'i' } },
          function (err, person) {
                 if (err) return handleError(err);
                 console.log('%s %s is a %s.',,, person.occupation);


Wed Jun 10 2020 12:20:30 GMT+0000 (UTC)

#javascript #mongoose #mongodb #mean

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension