$bit
The `$bit` operator performs bitwise updates on integer fields. It supports bitwise AND, OR, and XOR operations.
Syntax
{
$bit: {
<field>: { <and | or | xor>: <integer> }
}
}
Parameters
field
stringrequiredThe field to update with bitwise operations.
and | or | xor
stringrequiredThe bitwise operation to perform (and, or, or xor).
<integer>
numberrequiredThe integer value to use in the bitwise operation.