I am trying to use the .or method to match at least one filter. It works with strings and also json objects, but doesn't seem to work for json arrays. However the syntax does work with the .filter method.
To Reproduce
I have a table table_name with a jsonb column named data. The content of this column is:
I'd like to be able to use match one filter (or perhaps match all filters) with an array of objects. Something like:
let one = await supabase
.from("table_name")
.select("*")
.or('data->one->value.cs.[{"label":"Red","value":"red"}], data->two->value.cs.[{"label":"Green","value":"green"}]');
console.log(one);
Describe the bug
I am trying to use the
.or
method to match at least one filter. It works with strings and also json objects, but doesn't seem to work for json arrays. However the syntax does work with the.filter
method.To Reproduce
I have a table
table_name
with a jsonb column nameddata
. The content of this column is:This query works as expected, fetching the one row:
However this query fails with an error:
Error being:
If I replace the
.or
with this I no longer see an error, but it also doesn't fetch a row:Expected behavior
I'd like to be able to use match one filter (or perhaps match all filters) with an array of objects. Something like:
System information