IS_ARRAY (NoSQL query)

APPLIES TO: NoSQL

Returns a boolean value indicating if the type of the specified expression is an array.

Syntax

IS_ARRAY(<expr>)  

Arguments

Description
expr Any expression.

Return types

Returns a boolean expression.

Examples

The following example checks objects of various types using the function.

SELECT VALUE {
    booleanIsArray: IS_ARRAY(true),
    numberIsArray: IS_ARRAY(65),  
    stringIsArray: IS_ARRAY("AdventureWorks"),   
    nullIsArray: IS_ARRAY(null),  
    objectIsArray: IS_ARRAY({size: "small"}),   
    arrayIsArray: IS_ARRAY([25344, 82947]),  
    arrayObjectPropertyIsArray: IS_ARRAY({skus: [25344, 82947], vendors: null}.skus),
    invalidObjectPropertyIsArray: IS_ARRAY({skus: [25344, 82947], vendors: null}.size),
    nullObjectPropertyIsArray: IS_ARRAY({skus: [25344, 82947], vendors: null}.vendor)
}
[
  {
    "booleanIsArray": false,
    "numberIsArray": false,
    "stringIsArray": false,
    "nullIsArray": false,
    "objectIsArray": false,
    "arrayIsArray": true,
    "arrayObjectPropertyIsArray": true,
    "invalidObjectPropertyIsArray": false,
    "nullObjectPropertyIsArray": false
  }
]

Remarks