getJsonFields
Extract field names from JSON object.
Extract field names from a JSON object. Returns a concatenated comma-separated field list ordered in ascending order.
Usage Details
select getJsonFields(fieldname) from table
Example
Input
table
json_data |
---|
{"a": "v", "b": "c"} |
{"a": {"b": "c"}} |
select *, getJsonFields(json_data) as a jsonFields from table
Output
json_data | jsonFields |
---|---|
{"a": "v", "b": "c"} | a , b |
{"a": {"b": "c"}} | a |
Updated 12 months ago