Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{value:{a:1,b:"yellow",c:{"foo":"baz"}}}]
Query
db.collection.aggregate([{"$replaceRoot":{"newRoot":"$value"}}])
Result