title: How do I store JSON objects in indexedDB?
body: <p>my return json file looks like this:</p>
  
  <pre><code>var data = [{"col1":"value1","col2":"value1","col3":"value1"},{"col1":"value2","col2":"value2","col3":"value2"},{"col1":"value3","col2":"value3","col3":"value3"}];
  </code></pre>
  
  <p>without JSON.stringify data looks like this:</p>
  
  <p>[object Object],[object Object],[object Object]</p>
  
  <p>but with it the result.length is not 5 but the total number of characters of the string and that way I cant do the loop</p>
  
  <pre><code>var result = JSON.stringify(data);
  for(i=0; i&lt;result.length; i++){
  var transaction = db.transaction([STORE], IDBTransaction.READ_WRITE);
  var put = transaction.objectStore(STORE).put(result);
  };   
  </code></pre>