Share via


Array expression - operators

Array expression operators perform operations on arrays and array elements.

Description
$arrayElemAt The $arrayElemAt returns the element at the specified array index.
$arrayToObject The $arrayToObject allows converting an array into a single document.
$concatArrays The $concatArrays is used to combine multiple arrays into a single array.
$filter The $filter operator filters for elements from an array based on a specified condition.
$indexOfArray The $indexOfArray operator is used to search for an element in an array and return the index of the first occurrence of the element.
$isArray The $isArray operator is used to determine if a specified value is an array.
$map The $map operator allows applying an expression to each element in an array.
$range The $range operator allows generating an array of sequential integers.
$reduce The $reduce operator applies an expression to each element in an array & accumulate result as single value.
$reverseArray The $reverseArray operator is used to reverse the order of elements in an array.
$slice The $slice operator returns a subset of an array from any element onwards in the array.
$sortArray The $sortArray operator helps in sorting the elements in an array.
$zip The $zip operator allows merging two or more arrays element-wise into a single array or arrays.