Project nested array element to top level using MongoDB aggregation pipeline
I have a groups collection with documents of the form { "_id": "g123" ..., "invites": [ { "senderAccountId": "a456", "recipientAccountId": "a789" }, ... ] } I want to be able to list all the invites received by a user. I…