mergeObjects ignores null operands. If all the
operands to mergeObjects resolves to null,
mergeObjects returns an empty document {}.

mergeObjects overwrites the field values as it merges
the documents. If documents to merge include the same field name, the
field, in the resulting document, has the value from the last
document merged for the field.

db.orders.aggregate([{$lookup:{from:"items",localField:"item",// field in the orders collectionforeignField:"item",// field in the items collectionas:"fromItems"}},{$replaceRoot:{newRoot:{$mergeObjects:[{$arrayElemAt:["$fromItems",0]},"$$ROOT"]}}},{$project:{fromItems:0}}])