Challenge 3: Design a $lookup Join — Possible Solution ==================================================================== { $lookup: { from: "products", localField: "product_id", foreignField: "_id", as: "product_details" } } WHY THIS WORKS AS AN ANSWER ------------------------------ from: "products" names the OTHER collection being joined in — the one holding the data we want to attach, just like the table named after JOIN in SQL. localField: "product_id" is the field on the CURRENT collection (orders) holding the value to match on — orders.product_id. foreignField: "_id" is the field on the OTHER collection (products) that value gets matched against — here, the product's own _id, since product_id is presumed to store a product's ObjectId. as: "product_details" names the new array field attached to each output order document, holding every matching product document (in practice, exactly one, since _id is unique). Worth noting: $lookup always attaches an ARRAY, even when — as here — there's exactly one match. A follow-on $project or $unwind stage is usually added afterward to pull the single matched product out of that one-element array into a plain object, which Chapter 2 covers directly.