DocumentDB LogoDocumentDB
HomeGitHubDiscordDocsPackagesBlogs
Back to DocumentationMQL Documentation
Commands
Aggregation
Query And Write
Operators
Accumulators
Aggregation
Arithmetic Expression
Array Expression
$arrayElemAt
$arrayToObject
$concatArrays
$filter
$indexOfArray
$isArray
$map
$range
$reduce
$reverseArray
$slice
$sortArray
$zip
Array Query
Array Update
Bitwise
Bitwise Query
Bitwise Update
Comparison Query
Conditional Expression
Data Size
Date Expression
Element Query
Evaluation Query
Field Update
Geospatial
Literal Expression
Logical Query
Miscellaneous
Miscellaneous Query
Object Expression
Projection
Set Expression
Timestamp Expression
Variable Expression
Window Operators
Reference/Operators/Array Expression

MongoDB Query Language (MQL) Array Expression Operators

Array expression operators perform operations on arrays and array elements.

$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.

Copyright © DocumentDB a Series of LF Projects, LLC. For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.