Skip to content

Instantly share code, notes, and snippets.

@happysundar
Created August 22, 2014 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happysundar/16a8bd202fdd1326a44a to your computer and use it in GitHub Desktop.
Save happysundar/16a8bd202fdd1326a44a to your computer and use it in GitHub Desktop.
how to extract an array out of JSONB in postgres
select array_agg(value) from jsonb_each_text('{"3d": "2011-05-20", "wide": "2011-05-20", "imax_3d": "2011-05-20"}'::jsonb);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment