Within a $match stage, how do you check whether an array contains all the specified elements
For example, array username contains both “kim” && “pat”
Within a $match stage, how do you check whether an array contains all the specified elements
For example, array username contains both “kim” && “pat”
Figured it out
Matching all documents with array username containing both “kim” && “pat”
{ $all: [“kim”, “pat”]}