Query for element of array in JSON column
For Postgres 9.4+ see adamc’s later answer. Or: Query for array elements inside JSON type Original answer for Postgres 9.3 Yes, that’s possible: SELECT * FROM tbl t, json_array_elements(t.json_col->’emails’) AS elem WHERE elem->>’id’ = 123; tbl being your table name, json_col the name of the JSON column. See also: How do I query using fields … Read more