Thank you, that was exactly what I was looking for. However your last comment made me think about restructuring the data model.
I have multiple games where each game has its own set of stats, as you saw on the original post. The two solutions I have thought of so far is one collection per game (what I currently have) or a single collection where each document has all the stats for all games. The reason I didn’t choose the second option was because it will end up being quite many read and write operations on that collection, but I also think I would want to avoid using $lookup
on multiple collections because I might end up having 20 games.
Do you have any advice on this?