Database
db={"products":[{"id":1,"name":"product 1"}],"features":[{"id":101,"name":"width"},{"id":102,"name":"length"},{"id":103,"name":"height"}],"productfeatures":[{"productId":1,"featureId":101,"value":"3"},{"productId":1,"featureId":102,"value":"4"},{"productId":1,"featureId":103,"value":"5"}]}
Query
db.products.aggregate([{$match:{id:1}},{$lookup:{from:"productfeatures",let:{productId:"$id"},pipeline:[{$match:{$expr:{$eq:["$$productId","$productId"]}}},{$lookup:{from:"features",let:{featureId:"$featureId"},pipeline:[{$match:{$expr:{$eq:["$id","$$featureId"]}}}],as:"productfeatures"}},{$project:{value:1,feature:{$arrayElemAt:["$productfeatures.name",0]}}}],as:"productfeatures"}}])