I am seriously baffled by mongodb\'s aggregate function. All I want is to find the newest document in my collection. Let\'s say each record has a field \"created\"
In the documentation i found that the $$ROOT expression addresses this problem.
$$ROOT
From the DOC: http://docs.mongodb.org/manual/reference/operator/aggregation/group/#group-documents-by-author