IS_DEFINED (NoSQL query)

APPLIES TO: NoSQL

Returns a boolean indicating if the property has been assigned a value.

Syntax

IS_DEFINED(<expr>)  

Arguments

Description
expr Any expression.

Return types

Returns a boolean expression.

Examples

The following example checks for the presence of a property within the specified JSON document.

SELECT VALUE {
    isDefined: IS_DEFINED({ "quantity" : 5 }.quantity), 
    isNotDefined: IS_DEFINED({ "quantity" : 5 }.name)
}
[
  {
    "isDefined": true,
    "isNotDefined": false
  }
]

Remarks