skip to Main Content

MongoDB – How to aggregate with deeply nested arrays

I have the following MongoDB structure: Division Collection: { "_id": ObjectId("5b28cab902f28e18b863bd36"), "name": "Premier League", ... "teams": [ ObjectId("5b28cab902f28e18b863bd01"), ObjectId("5b28cab902f28e18b863bd02"), ObjectId("5b28cab902f28e18b863bd03"), ... ] ... }, ... Teams Collection: { "_id": ObjectId("5b28cab902f28e18b863bd01"), "name": "Liverpool", ... "players": [ ObjectId('5b23tmb902f28e18b863bd01'), ObjectId('5b23tmb902f28e18b863bd02'), ObjectId('5b23tmb902f28e18b863bd03'), ... ]…

VIEW QUESTION
Back To Top
Search