How to horizontal filter a json value? #2743
-
e.g. A plain get:
I want to filter where areas_of_work.id == 4 I thought it should be Error:
|
Beta Was this translation helpful? Give feedback.
Answered by
laurenceisla
Apr 11, 2023
Replies: 1 comment
-
Hi, it could be done more easily with a Then the request would be: GET /projects?areas_of_work=cs.[{"id":1}] |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wolfgangwalther
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, it could be done more easily with a
jsonb
column and the@>
operator (cs
in PostgREST). You could change the column from ajson
tojsonb
or add a new computed column that castsareas_of_work
tojsonb
.Then the request would be: