Limit number of objects pushed to array in MongoDB aggregation
I've been trying to find a way to limit the number of objects i'm pushing to arrays I'm creating while using "aggregate" on a MongoDB collection. I have a collection of students - each has these relevant keys: class number…