We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3824c65 commit 9938c44Copy full SHA for 9938c44
source/reference/projection/elemMatch.txt
@@ -35,9 +35,8 @@ $elemMatch (projection)
35
36
.. code-block:: javascript
37
38
- db.students.find( { zipcode: 63109 },
39
- { _id: 0,
40
- dependents: { $elemMatch: { school: 102 } } } )
+ var projection = { _id: 0, dependents: { $elemMatch: { school: 102 }}};
+ db.students.find( { zipcode: 63109 }, projection);
41
42
The query would return all documents where the value of the
43
``zipcode`` field is ``63109``, while the projection excludes
0 commit comments