$out stage:
In the MongoDB Aggregation framework, the $out stage is used to send the output from the aggregation pipeline to the newly created collection or existing specified collection.
Precaution:
$out stage must be the last stage in the pipeline.
If the output collection does not exist, then a new collection will create automatically.
Post a Comment