$elemMatch
Projects only the first element from an array that matches the specified query condition, useful for returning specific array elements.
Syntax
{ <field>: { $elemMatch: { <query_conditions> } } }
Parameters
field
stringrequiredArray field name to project elements from
query_conditions
objectrequiredQuery conditions to match array elements