title: How to query on a JSON-type field with SQLAlchemy?
body: <p>This is just a simple example.</p>
  
  <pre><code>field = [[1,12,6], [2,12,8]]
  </code></pre>
  
  <p>I think about storing this in a json-typed field with SQLAlchemy in sqlite3 database.</p>
  
  <p>But how can I query on this with SQLAlchemy (not SQL)?
  e.g.</p>
  
  <ul>
  <li>rows where len(field) is 3</li>
  <li>rows where field[1][2] is not 12</li>
  <li>rows where len(field[*]) is not 3</li>
  <li>group by field[2]</li>
  <li>sum field[1] where field[0] is 1</li>
  </ul>
  
  <p>Is it even possible?</p>
  
  <p>Maybe it would be easier to implent this with a classical many-to-many table (incl. a link-table) instead of json-field?</p>