A
A
albertalexandrov2019-09-26 13:12:38
PostgreSQL
albertalexandrov, 2019-09-26 13:12:38

What is the equivalent of JSONB_OBJECT_KEYS for values?

Is there a similar JSONB_OBJECT_KEYS function that would retrieve values?
Or how can it be done?
The output should be a list of values.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
albertalexandrov, 2019-09-26
@albertalexandrov

SELECT array(select s.value from jsonb_each(context) as s)
FROM table_name

M
Melkij, 2019-09-26
@melkij

json_each / jsonb_each

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question