The solution for this is to define a custom .toJSON() method on the Mongoose schema and delete the properties which you want to hide in the response.
Software Developer at Microsoft | Tech Enthusiast | Java | JavaScript | Full Stack Dev
I am a Full Stack Software Developer working at Microsoft.
Markdown supported · ⌘↵ to post
No responses yet.