Hide properties of Mongoose objects in Node.JS JSON responsesTech by Sunny Srinidhi - July 19, 2017July 19, 20170 Many a times, we'll encounter a situation where we'll have to hide certain properties of Mongoose objects, especially when we're sending those objects in responses. For example, suppose you have an API endpoint like so: /user/:id. You will, obviously, send a user object as a response to this request. But there will be certain properties of the User schema (such as password) which you'd want to remove before sending the object in the response. Laravel developers can relate this to the $hidden array in Eloquent models, which automatically hides the given list of properties before sending the object in the response. There is no out-of-the-box solution for this in Mongoose. But it's pretty easy to achieve, even though it's a bit verbose.