Let\'s say I have a Postgres database (9.3) and there is a table called Resources. In the Resources table I have the fields id which is an
Resources
id
If you are using JSON type (not JSONB) the following worked for me:
Note the '"object"'
'"object"'
query = db.session.query(ProductSchema).filter( cast(ProductSchema.ProductJSON["type"], db.String) != '"object"' )