Reputation: 683
I am creating an application to save data locally using IndexexDB. Is there any way to get and insert bulk data from a indexed DB as json.This is what i have done so far
var request = store.openCursor();
request.onsuccess = function(evt) {
var cursor = evt.target.result;
if (cursor) {
alert("id: " + cursor.key + " is " + cursor.value.name + " ");
cursor.continue();
}
else {
console.log("No more entries!");
}
};
Upvotes: 0
Views: 432
Reputation: 13131
What you are doing is the best way. Indexeddb does not have high level api.
Upvotes: 1