skip to Main Content

Simple MongoDB Aggregation

I'm a bit confused on how to group using aggregation but still be able to extract specific values from arrays: db.collection.aggregate([ { "$unwind": f"${stat_type}" }, { "$group": { "_id": "$userId", "value" : { "$max" : f"${stat_type}.stat_value" }, "character" : f"${stat_type}.character_name",…

VIEW QUESTION
Back To Top
Search