Database
db={orders:[{_id:1,customerId:123,lineItems:[{productId:"a",quantity:1},{productId:"b",quantity:2},{productId:"c",quantity:3}]},{_id:2,customerId:456}],products:[{productId:"a"},{productId:"b"},{productId:"c"},{productId:"d"}]}
Query
db.orders.aggregate([{$match:{customerId:123},},{$lookup:{from:"products",let:{productIds:"$lineItems.productId"},pipeline:[{$match:{$expr:{$in:["$productId","$$productIds"]}}}],as:"products",}},{"$addFields":{"zipped":{"$zip":{"inputs":["$lineItems","$products"]}}}},{$project:{"lineItems":0,products:0}}])