- Categories:
Semi-structured and structured data functions (Array/Object)
OBJECT_KEYS¶
Returns an array containing the list of keys in the top-most level of the input object.
Syntax¶
Arguments¶
Returns¶
The function returns an ARRAY containing the keys.
If object is a structured OBJECT, the function returns an ARRAY(VARCHAR).
Usage notes¶
If the object contains nested objects (e.g. objects within objects), this returns only the keys from the top-most level.
Examples¶
Basic example¶
The next example shows OBJECT_KEYS working with both an OBJECT and a VARIANT that contains a value of type OBJECT.
Example of nested objects¶
This example shows that if the object contains nested objects, only the keys from the top-most level are returned.