Set Operators

OperatorDescriptionExample
$setEqualsEvaluates to true if the passed in array properties or expressions contain the same distinct elements{“$setEquals”: [ {“$array”: [“cpg”, “mvc”, “kvm”]}, “c_requested” ] }}
$setIntersectionReturns the intersection between 2 or more input arrays.{“$setIntersection”:[“c_available”, “c_reserved”][“c_available”, “c_reserved”]}
$setUnionCombines 2 or more input arrays.{“$setUnion”:[{“$array”: [“000000000000000000000007”]}, “roles”]}}}
$setDifferenceReturns the difference between 2 or more input arrays.{“$setDifference”:[{“$array”: [“000000000000000000000007”]}, “roles”]}}}
$setIsSubsetReturns true if the first array is a subset of the second.{“$setIsSubset”: [“c_some”, “c_all”][“c_some”, “c_all”]}
$anyElementTrueReturns true if any property or expression in the passed in array evaluates to true.{“$anyElementTrue”: [“c_bool”, “c_fav”][“c_bool”, “c_fav”]}
$allElementsTrueReturns true if all properties or expressions in the passed in array evaluate to true.{“$allElementsTrue”: [“c_bool”, “c_fav”][“c_bool”, “c_fav”]}