Search within n-th item of an array? #4093
-
I have a table with a few text arrays as columns (e.g. Can I search within only the n-th elements of such lists? How does the API call look like? I can use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hmm... it should work. Which PostgREST version are you using and do you have a minimal example to demonstrate that it's not working? The filter works in our tests. This is the table: postgrest/test/spec/fixtures/schema.sql Lines 2495 to 2499 in 5206319 And this is a filter test: postgrest/test/spec/Feature/Query/JsonOperatorSpec.hs Lines 215 to 221 in 5206319 |
Beta Was this translation helpful? Give feedback.
-
That's probably because |
Beta Was this translation helpful? Give feedback.
That's probably because
->
will look for JSON. This works in our tests, because we are filtering for numbers. With->
you'd probably look for a quoted string. But with->>
it should work, because that will return text.