# Pastebin TEVExqU2 json_each ( json ) → setof record ( key text, value json ) jsonb_each ( jsonb ) → setof record ( key text, value jsonb ) Expands the top-level JSON object into a set of key/value pairs. select * from json_each('{"a":"foo", "b":"bar"}') → key | value -----+------- a | "foo" b | "bar"