$isArray (aggregation)
On this page
Definition
-
$isArray
-
New in version 3.2.
Determines if the operand is an array. Returns a boolean.
$isArray
has the following syntax:
Behavior
The <expression>
can be any valid expression. For more information on expressions, see Expressions.
Example | Results |
---|---|
{ $isArray: [ "hello" ] } |
false |
{ $isArray: [ [ "hello", "world" ] ] } |
true |