Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"key":[["a","b","c"],["e","f"],["d"]]}]
Query
db.collection.aggregate([{$project:{fieldA:{$reduce:{input:"$key",initialValue:[],in:{$concatArrays:["$$value","$$this"]}}}}}])
Result