mongoose-sanitize-json
This plugin removes the following fields "_id, __v, __t" and published virtuals "id" when the document is converted to json. (Note other virtual fields will also be published)
Installation
$ npm install mongoose-sanitize-json
Usage
var mongoose = ;var sanitizeJSON = ; var personSchema = mongoose; personSchema;