Mongodb iterative methods inside aggregate pipeline Hi so I am working on a database and we have 100k entries where the structure looks similar to