title: How to insert json array data in postgres using python
body: <p>[{&quot;foo&quot;:&quot;data1&quot;},{&quot;foo&quot;:&quot;data2&quot;}]</p>
  <pre><code>
  
  create table jsonData (
  id serial primary key,
  data json []
  )
  
  </code></pre>
  <pre><code>query = ''' INSERT into jsonData (id,data) VALUES (%s,%s) '''
  values = (id,data)
  db.insertQuery(query, values)
  </code></pre>
  <p>i cant insert json[] data into jsonData</p>