Database
[{"id":"98syf87erfw8n","foo":{"objectid":"39","stuff":"65"},"yearpublished":"1979"}]
Query
db.collection.aggregate([{$group:{_id:"$yearpublished",myItem:{$first:"$$ROOT"}}},{$project:{yearpublished:"$myItem.yearpublished",foo:"$myItem.foo",id:"$myItem.id",_id:0}}])