NULL if the input is NULL, and raises an error if the input JSON value is not an array.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<json> | The JSON array whose length is taken. | JSON |
Return Type
TheJSON_ARRAY_LENGTH function returns a result of type INTEGER.
Remarks
Only the top-level elements of the array are counted; nested arrays count as a single element each. An untyped string literal is interpreted asJSON, so an explicit ::JSON cast is not required.