I have a flash application using flask-SQLAlchmey. I have a db model like this
from sqlalchemy.dialects.postgresql import JSON from flask.ext.sqlalchemy import SQLAlchemy
...
db = SQLAlchemy()
...
class Custom(db.Model): __tablename__ = 'custom' ... data = db.Column(JSON) ...
Data field
looks like this: [{"type": "a string", "value": "value string"}, {"type": "another", "value": "val"}, ...]
I want to query all user objects in which the data contains {"type": "anything", "value": "what I want"}
.
source share