Guys i am finding hard to understand whats the difference between those two.Please someone explain.Thanks in advance
There are 2 ways to use
Below reference documents clears every doubts of usage with example.
$elemMatchoperator matches documents that contain an array field with at least one element that matches all the specified query criteria.
I think we just discussed this topic here: Find or aggregate in this type of query