Wrap all fields of MongoDB Document into a root/top level object
Suppose I have two documents in a collection: [ { "_id": 0, "name": "aaaa", "phone": 111 }, { "_id": 1, "name": "bbbb", "phone": 999 } ] I want to run an aggregation pipeline that will merge/wrap/combine ALL the fields into…