In MongoDB, the $allElementsTrue
aggregation pipeline operator evaluates an array as a set and returns true
if no element in the array is false
.
If the array contains an element that is false
, then $allElementsTrue
returns false
.
An array’s element is true
if it’s not false
, null
, 0
, or undefined
.