I need to save an object like the one below in localstorage . I need to get this object and edit it, and then save it back to localstorage next time.
var data = {lastEdit:"September", expires:"December", records:[{arrives: "12:45", departs: "12:51"}, {arrives: "13:03", departs: "13:04"}]};
I tried this, but he said 'undefined':
localStorage.setItem("dataStore1", data); var output = localStorage.getItem("dataStore1");
What can I do to fix this?
solvable
source share