Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Atualizado 13/12/2024
Send us feedback
json_object_keys
Applies to: Databricks SQL Databricks Runtime
Returns all the keys of the outermost JSON object as an array.
json_object_keys(jsonObject)
jsonObject: A STRING expression of a valid JSON array format.
jsonObject
An ARRAY < STRING >.
If ‘jsonObject’ is any other valid JSON string, an invalid JSON string or an empty string, the function returns NULL.
> SELECT json_object_keys('{}'); [] > SELECT json_object_keys('{"key": "value"}'); [key] > SELECT json_object_keys('{"f1":"abc","f2":{"f3":"a", "f4":"b"}}'); [f1,f2]
: operator
json_array_length function
json_tuple table-valued generator function
from_json function
get_json_object function
schema_of_json function
to_json function