Suggest an editImprove this articleRefine the answer for “What does the $project stage do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The `$project` stage builds a new "projection" of a document - selecting, renaming, or computing the fields that continue down the pipeline; conceptually the analog of `SELECT` in SQL. **Key point:** it can keep only the fields you need, hide the rest, create computed fields, and rename them - shaping the document for the next stage or the final response.Shown above the full answer for quick recall.Answer (EN)ImageThe `$project` stage builds a **new "projection" of the document**, selecting, renaming, or computing the fields that continue down the pipeline. Conceptually, this is the analog of `SELECT` in SQL. ### What it can do - keep only the fields you need - hide fields you don't need - create computed fields - rename fields - nest or flatten data differently ### Example ```js { $project: { name: 1, totalPrice: { $multiply: ["$price", "$qty"] } } } ``` After `$project`, the document keeps only `name` and the new `totalPrice` field. ### The key idea `$project` is the **stage that shapes the final set of fields**, letting you simplify a document, reassemble it, and prepare it for the next stage or the final response.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.