Recently upgraded to using PostgreSQL 9.3.1 to leverage the JSONfunctionalities. In my table I have a json type column that has a structure like this:
{ \
Came across this post and found that you can directly query on table like this:
SELECT * FROM table_name, json_array_elements(json_column) AS data WHERE data->>'id' = 123;
Omitting this part:
json_array_elements(t.json_col->'emails')