Convert Mongoose docs to json
问题 I returned mongoose docs as json in this way: UserModel.find({}, function (err, users) { return res.end(JSON.stringify(users)); } However, user.__proto__ was also returned. How can I return without it? I tried this but not worked: UserModel.find({}, function (err, users) { return res.end(users.toJSON()); // has no method 'toJSON' } 回答1: You may also try mongoosejs's lean() : UserModel.find().lean().exec(function (err, users) { return res.end(JSON.stringify(users)); } 回答2: Late answer but you