1

I have one JSON column in my table. I want to filter by this column using sqlalchemy with Python and MySQL. I've tried in this way, but unsuccessfully.

My column: ["1", "2", "3", "4", "5"]

myTable.select().where(func.json_contains(f'"{mycolumn}"', f'"{myArray}"'))
Fernanda
  • 31
  • 2
  • This is pretty similar to this except you would use myTable.c.column instead of myClass.column when not using the orm: [sqlalchemy-json-column-how-to-perform-a-contains-query](https://stackoverflow.com/questions/39470239/sqlalchemy-json-column-how-to-perform-a-contains-query) – Ian Wilson Mar 18 '22 at 00:03

0 Answers0