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

// 1: FIND the record User.findOne( {email : 'simon@theholmesoffice.com'}, function(err, user) { if(!err){ // 2: EDIT the record user.name = "Simon"; // 3: SAVE the record user.save(function(err,user){ console.log('User saved:', user); }); } }; );