Querying json values in postgresql

Hi, I have a table with a json field in it. I want to do a query where I can filter the result based on a key-pair value in the json column. I looked at a bunch of resources online and none of the solutions provided worked.

IE. Where table.column @> ‘{“key”:“value”}’

Request your help in figuring out how to make this work. Thanks.

Did you try setting the field type to JSON in the admin panel under datamodel -> table X -> field Y:

Update: Hmm, on searching further on GitHub in it looks like JSON support with Postgres might still not be fully baked yet, with below issue still open, so maybe native SQL queries as I guess you were pointing to yourself is the path to follow for now:

1 Like

This simple change unlocked a world of possibilities re: viewing JSON data cleanly in columns. Thanks!