We have a DB model that contains a 'foo' field which is JSONType
Inside this we store the following data:
foo => [{"apps": ["test_app"]}, {"tags": ["test_tag1", "test_tag2"]}]
My question is, how can I, using session.query, select all items that have a test_tag_1 as a tag inside the foo column?
I tried session.query(MyModel).filter(MyModel.foo[0]['tags'].in_('test_tag1')).all() but this results in
*** NotImplementedError: Operator 'getitem' is not supported on this expression
Is what I am trying to achieve even possible?