* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
9 lines
825 B
Markdown
9 lines
825 B
Markdown
# $project
|
|
|
|
The `$project` stage in MongoDB aggregation pipelines is used to reshape documents by including, excluding, or transforming fields, allowing you to control exactly which data is passed to subsequent pipeline stages. It can perform field selection (similar to SQL SELECT), create computed fields using expressions, rename fields, nest or flatten document structures, and apply various transformations like mathematical operations, string manipulations, or date formatting.
|
|
|
|
Visit the following resources to learn more:
|
|
|
|
- [@official@Aggregation Pipeline](https://www.mongodb.com/docs/manual/core/aggregation-pipeline/)
|
|
- [@official@$project](https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/)
|
|
- [@official@$group](https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/) |