New in version 2.6.
Compares two or more arrays and returns
trueif they have the same distinct elements and
$setEqualshas the following syntax:
If a set contains a nested array element,
$setEquals does not descend into the nested array but evaluates the array at top-level.
experiments collection with the following documents:
The following operation uses the
$setEquals operator to determine if the
A array and the
B array contain the same elements:
The operation returns the following results: