JSONB_OBJECT_KEYS
Returns the keys of a JSON object — one row per key.
Syntax
JSONB_OBJECT_KEYS(<json object>)
Only the names of top-level keys, without values. Handy for finding out which fields actually occur in a JSON column, or checking that nothing extra has turned up.