2

I have a table that looks like this:

json in postgresql

There are about 10k rows and I am not sure exactly what keys are present throughout the dataset.

I want to write a query in postgresql to return a result that delivers all keys as columns like so:

parse json with postgresql

Any help?

samthebrand
  • 3,020
  • 7
  • 41
  • 56
  • 1
    If your search also brought you to this question (which is now marked as a duplicate and it's closed), I suggest you consider a solution based on "cross join lateral" and jsonb_to_record() or json_to_record() as outlined in https://www.reddit.com/r/PostgreSQL/comments/2u6ah3/how_to_use_json_to_recordset_on_json_stored_in_a/ – Luis May 21 '21 at 03:04

0 Answers0