Syntax
JSON_ELEMENTS(<string>;N)
Description
Returns the top N elements of a JSON array.
If N is left blank, all elements of the JSON array are returned.
Examples
Column 1 | N | JSON_ELEMENTS returns |
---|---|---|
[a,b,null] | 1 | a |
[a,b,null] | 2 | a, b |
[a,b,null] | 3 | a, b, null |