jsonb_each_text ( jsonb ) → setof record ( key text, value text )Expands the top-level JSON object into a set of key/value pairs. The returned
values will be of type text.select * from json_each_text('{"a":"foo", "b":"bar"}') → key | value
-----+-------
a | foo
b | bar