I watched and implemented Lauren Schafer excellent explenation on piplelines & aggregation, but did’nt quiet understand how to take the result and group them in a collection so I can later on create a get request to present them in my table
Mongodb aggregation framework is really interesting and I’m happy to help you understand.
Could you include the video that you watched if possible?
Could you share with me what did you understand about pipeline and aggregation so far? maybe you can make an example to show how you know it. A counting result would be good (do not have to complex just typical with
A good play to play around with Mongo Aggregation is the
Mongo Playground (https://mongoplayground.net/)
Go and play with it
In brief, $out takes the documents returned by the aggregation pipeline and writes them to a specified collection. Starting in MongoDB 4.4, you can specify the output database.
$outstage must be the last stage in the pipeline. The
$outoperator lets the aggregation framework return result sets of any size.
In case you have any doubts, please feel free to reach out to us.
Thanks and Regards.
Curriculum Services Engineer