What does the $elemMatch operator do when used in a MongoDB query on an array field?
-
A
Returns all elements from the matching array
-
B
Matches documents where at least one array element satisfies all specified conditions
-
C
Counts the number of matching array elements
-
D
Returns only the matching elements from the array