Aggregate and reduce a nested array based upon an ObjectId
问题 I have an Event document structured like so and I'm trying to query against the employeeResponses array to gather all responses (which may or may not exist) for a single employee: [ { ... eventDate: 2019-10-08T03:30:15.000+00:00, employeeResponses: [ { _id:"5d978d372f263f41cc624727", response: "Available to work.", notes: "" }, ...etc ]; } ]; My current mongoose aggregation is: const eventResponses = await Event.aggregate([ { // find all events for a selected month $match: { eventDate: { $gte