Quantcast
Channel: MongoDB simplifying double $elemMatch query - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by JohnnyHK for MongoDB simplifying double $elemMatch query

$
0
0

No, you don't need $elemMatch for that. You could just use:

{'chickens.recentlyDroppedEggs.appearance': 'red-blue-striped'}}}}

$elemMatch is typically only needed when you want to match multiple fields in an array element or apply multiple operators to a single field (e.g. $lt and $gt).


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>