Using arrayContains with a jsonb postgres type

arrayContains(matches.teamA, [id])
arrayContains(matches.teamA, [id])
teamA is a jsonb type of string[] i want to see if the id exists inside whats the best way of doing this
1 Reply
MAST
MAST14mo ago
Well, you can use the arrayContains method. You can ignore the error, it'll work. I used @ts-expect-error and explaind why the error was expected. Maybe, I'll make a PR to make it accept JSONB columns as well. What do you think? @Andrew Sherman
Want results from more Discord servers?
Add your server