Postgres JSON query -- using ? in the select

Given a PostgreSQL table that has and id and a details column where the details column is JSONB and includes an array of trainer names, the following query works fine in psql and IDEs:

select id, details->‘trainers’ from courses where details->‘trainers’ ? ‘Trainer.Name’

However the query fails in appsmith with the ‘?’ seemingly being inferred to be an input parameter.

How can I create this query within appsmith?

@vernons Can you try using ?? instead of ?

1 Like

The double question mark ?? did the trick. Thanks!