JSON_COUNT

The JSONCOUNT function returns the number of items in a JSON array

Syntax

JSON_COUNT(json, jsonpath)

Example

The following example returns the number of items in the JSON array.

SELECT  JSON_COUNT(JSON_ARRAY(1, 2, 3),'$') json
FROM /shared/examples/ds_orders/tutorial/customers
WHERE customerid = 10
Result: 3