- Reference >
- Query, Update, Projection, and Aggregation Operators >
- $elemMatch (query)
$elemMatch (query)¶
See also
-
$elemMatch
¶ New in version 1.4.
The
$elemMatch
operator matches more than one component within an array element. For example,returns all documents in
collection
where the arrayarray
satisfies all of the conditions in the$elemMatch
expression, or where the value ofvalue1
is 1 and the value ofvalue2
is greater than 1. Matching arrays must have at least one element that matches all specified criteria. Therefore, the following document would not match the above query:while the following document would match this query: