MongoDB query get n records of each group (aggregation)
For example, you might want to get 5 members of each group in your application.
For example, you might want to get 5 members of each group in your application.
When I worked with Mongo Go Driver, it was complicate to make a search, or update query document(s) with dynamic conditions.