Answers for "mongoose only return certain attributes"

Go
1

return only specific attributes when making query mongoose

//query with mongoose
var query = dbSchemas.SomeValue.find({}).select('name');
Posted by: Guest on October-15-2020
8

mongoose find return only certain fields

db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
Posted by: Guest on September-24-2020

Code answers related to "mongoose only return certain attributes"

Browse Popular Code Answers by Language