my return json file looks like this:
var data = [{"col1":"value1","col2":"value1","col3":"value1"},{"col1":"value2","col2":"value2","col3":"value2"},{"col1":"value3","col2":"value3","col3":"value3"}];
without JSON.stringify data looks like this:
[object Object],[object Object],[object Object]
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
var result = JSON.stringify(data);
for(i=0; i<result.length; i++){
var transaction = db.transaction([STORE], IDBTransaction.READ_WRITE);
var put = transaction.objectStore(STORE).put(result);
};