I\'m running some project on MEAN.js and I\'ve got a following problem. I want to make some user\'s profile calculation and the save it to database. But there\'s a problem w
The answer above from Majed A is the simplest solution that works for single objects properties, we can even make it for more easier by removing the ...user spreader. just delete the property from your object._doc sub-object. in your example it would have been:
user.save()
delete user._doc.password
res.status(201).json(user) // The password will not be shown in JSON but it has been saved.