JSON_KEYS

Learn how to use the JSON_KEYS json function in PlaidCloud Lakehouse. Returns the keys of the top-level JSON object as a JSON array - with syntax and examples.

Returns the keys of the top-level JSON object as a JSON array.

Analyze Syntax

func.json_keys(get_column(table, 'data'))

Analyze Examples

func.json_keys(get_column(table, 'data'))

┌────────────────┐
 ["name","age"] 
└────────────────┘

SQL Syntax

JSON_KEYS(<data>)

SQL Examples

SELECT JSON_KEYS(PARSE_JSON('{"name":"Alice","age":30}'));

┌────────────────┐
 ["name","age"] 
└────────────────┘