I\'m using the Mongoose Library for accessing MongoDB with node.js
Is there a way to remove a key from a document? i.e. not just set the value to n
Try:
User.findOne({}, function(err, user){ // user.key_to_delete = null; X `user.key_to_delete = undefined;` delete user.key_to_delete; user.save(); });