/
getJsonFields

getJsonFields

Extract field names from a JSON object. Returns a concatenated comma-separated field list ordered in ascending order.

Usage Details

LQL Command

select getJsonFields(fieldname) from table

Example

Input
table

json_data
{"a": "v", "b": "c"}
{"a": {"b": "c"}}

LQL Command

select *, getJsonFields(json_data) as a jsonFields from table

Output

json_data jsonFields
{"a": "v", "b": "c"} a , b
{"a": {"b": "c"}} a

Related content

extractFieldInJSON
extractFieldInJSON
More like this
fieldnamesFromJson
fieldnamesFromJson
More like this
jsonToColumns
jsonToColumns
More like this