Is there a way to filter array of subdocuments in the $match stage?
This question is an extension of the above.
Considering the answer of the question, what if in addition, if there are multiple subdocuments that match but you only want a specific element, such as the element with the maximum of a field, etc.
How would you modify the query