Hi,
I am looking for an example how to use sqlalchemy core to search an item from a column having a jsonb list.
I have PosgreSQL database having following example table from which I am searching an item:
create table jtable (data jsonb);
insert into jtable (data) values ('["first","second"]');
insert into jtable (data) values ('["third","fourth"]');
select * from jtable, jsonb_array_elements_text(data) item where item LIKE '%third%';
I am trying to use sqlalchemy to do the search with a select like: sql_command = select(tables['jtable'].c['data'].where(...)), but I don't know how to write where().
Thanks