Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"input":"Test","output":"general"}]
Query
db.collection.aggregate([{$project:{_id:0,input:1,output:{$arrayToObject:[[["$output",1]]]}}}])
Result