Handling JSON in PostgreSQL
16 Sep 2019Found a useful cheatsheet that listed out operations on JSON in PostgreSQL.
If I want to list the rows where column col1 in table table1 contains a JSON object with the key key1, I can use:
select * from table1
where col1->'key1' IS NOT NULL