Database

[{a:[{x:1},{y:1}]},{a:[{z:1}]},]

Query

db.collection.aggregate([{"$unwind":{path:"$a"}},{"$replaceRoot":{"newRoot":{"$mergeObjects":["$a"]}}}])

Result