Here is a brief summary of other important pipeline expression operators:
Category | Operator | Notes |
Arithmetic | $add, $subtract, $multiply, $divide, and $round |
Performs the associated arithmetic operation to returns sums of numbers, and so on. Note that $add and $subtract also work on dates. It should be noted that $round is only available as of MongoDB 4.2. |
Array | $arrayElemAt, $first, and $last |
Returns the array element at a specified index or the first/last elements. $first and $last were introduced in MongoDB 4.4. |
$arrayToObject and $objectToArray | Converts between an array and object. | |
$in | Returns a Boolean value: TRUE if the item is in the array and FALSE otherwise. | |
$map | Applies an expression to every array element. | |
$filter | Returns a subset of array items matching the filter. | |
Boolean | $and, $or, and $not | Lets you create complex expressions. |
Comparison | $eq, $gt, $gte, $lt, $lte, $ne, and... |