O'Reilly logo
  • Patrick S thinks this is interesting:

The earlier code could be rewritten using the dot syntax method as in the following:

User.find({'name' : 'Simon Holmes'})
.select('_id name email')
.exec(function (err, users){
  if (!err){
    console.log(users); // output array of users found


Cover of Mongoose for Application Development


using QueryBuilder to build up over multiple steps