Reputation: 1445
I have the following code, but this is pulling all the documents and showing the two mentioned fields. But I want to get only those documents which have these fields.
.get(function(req, res) {
partment.find({},'unitID UnitType',function(err, apartments) {
if (err)
res.send(err)
res.json(apartments);
});
}
Any Idea how I can do that ?
Upvotes: 0
Views: 31