Performs an aggregation operation on the provided collection using the specified pipeline.
The input data source to aggregate.
An array of aggregation stages to process the collection.
Optional
Optional settings to customize the aggregation behavior.
The result of the aggregation as an array of objects.
Performs an aggregation operation on the provided collection using the specified pipeline.