remove _id from mongo result

Try this solution:

app.get('/itesms', function(req, res) {
  items.find({}, { _id: 0 }).toArray(function (err, array) {
    res.send(array);
  })
});

Leave a Comment