4 Matching Annotations
- Jun 2021
-
snippets.aktagon.com snippets.aktagon.com
-
You can use jsonb_agg and jsonb_array_elements_text to flatten or unnest an array of arrays in PostgreSQL: SELECT jsonb_array_elements_text(jsonb_agg(array_of_arrays)) FROM x;
-
-
www.compose.com www.compose.com
-
SELECT jsonb_array_elements_text(data->'genres') AS genre FROM books WHERE book_id = 1; That will expand the JSON array into a column:
-
-
www.postgresql.org www.postgresql.org
-
json_array_elements_text ( json ) → setof text jsonb_array_elements_text ( jsonb ) → setof text Expands the top-level JSON array into a set of text values. select * from json_array_elements_text('["foo", "bar"]') → value ----------- foo bar
-
-
dba.stackexchange.com dba.stackexchange.com