KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I do the .find operation like the following: Collection.find({name: 'Erik'}, function (err, docs) { // do momething }); 'docs' variable is populated with an array of fully functional mongoose documents. But I need to get an array of pure JSON objects. I know I can loop through the 'docs' array by forEach and get an objects by using .toJSON() method. Does mongoose support the feature, I'm interested?
Tags (comma-separated)
Save Edits
Cancel