0

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

  • Can you add the details to this question. It's not possible to answer without sample data, expected output. – Noel Jan 20 '23 at 06:22

0 Answers0