Contents
json_object_keys()
A function returning the set of keys in the top-level JSON object
json_object_keys()
is a system function returning the set of keys in the top-level JSON object.
json_object_keys()
was added in PostgreSQL 9.3.
Examples
Basic usage example for json_object_keys()
:
postgres=# SELECT json_object_keys( $$ {"foo": {"bar": "bip"}, "bar": {"bat": "bop", "baz": "zoo"}} $$ ); json_object_keys ------------------ foo bar (2 rows)
References
- PostgreSQL documentation: JSON Processing Functions