Skip to content

How to horizontal filter a json value? #2743

Answered by laurenceisla
dnk8n asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, it could be done more easily with a jsonb column and the @> operator (cs in PostgREST). You could change the column from a json to jsonb or add a new computed column that casts areas_of_work to jsonb.

Then the request would be:

GET /projects?areas_of_work=cs.[{"id":1}]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants