Question

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!");  
        }  

};

Was it helpful?

Solution

What you are doing is the best way. Indexeddb does not have high level api.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top