This is a very simple question, just a very bad brain freeze. In my aggregation, I just want to remove the "_id" field using $ project, but return the rest. However i get
"$ project requires at least one output field"
I would think that:
db.coll.aggregate( [ { $match .... }, { $project: { _id: 0 }}])
thank
source
share