SupabaseS
Supabase4y ago
Nin

Unable to filter on jsonb array column

Hi! I'm trying to do a select query on my Supabase database where I filter on a color which is contained in a jsonb array column. However, it's currently moaning about me not sending the array value correctly and I cannot seem to figure out what I'm doing wrong.

.from('source')
                .select(
                  'name, uuid, image, bio, type, colors, collector_number',
                )
                .contains('colors', ['Orange'])


Error message:

{"code":"22P02","details":"Token \"Orange\" is invalid.","hint":null,"message":"invalid input syntax for type json"}
Was this page helpful?