Posted On: Feb 22, 2018
Aggregations are a set of functions that are used to manipulate the data that has been returned from a MongoDB query. In Mongoose, aggregations work as a pipeline. The aggregate function accepts the array of data transformations which are applied by data using different methods in terms of arguments.
Syntax: db.customers.aggregate([ ... aggregation steps go here ...]);
In above, aggregation is applied to data of customers.
Never Miss an Articles from us.