Database

db={orders:[{_id:ObjectId("62c9a0f5dfb6cf9c7fe859f2"),products:[{product_id:ObjectId("62c9a0f5dfb6cf9c7fe859e5"),config:{a:1}},{product_id:ObjectId("62c9a0f5dfb6cf9c7fe859e1"),config:{b:2}},]}],products:[{_id:ObjectId("62c9a0f5dfb6cf9c7fe859e1"),title:"Product 1",manufacturer:"Good Company",},{_id:ObjectId("62c9a0f5dfb6cf9c7fe859e5"),title:"Product 2",manufacturer:"Another Company",}]}

Query

db.orders.aggregate([{$match:{_id:ObjectId("62c9a0f5dfb6cf9c7fe859f2")}},{$lookup:{from:"products",localField:"products.product_id",foreignField:"_id",as:"productsDetails"}},{$set:{products:{$map:{input:"$products",in:{$mergeObjects:["$$this",{$arrayElemAt:["$productsDetails",{$indexOfArray:["$products._id","$$this.product_id"]}]}]}}},productsDetails:"$$REMOVE"}}])

Result