Я думаю, что ваши jsonstuffs должны быть такими объектами:
var jsonstuffs = {
setData: function (key, obj) {
var values = JSON.stringify(obj);
localStorage.setItem(key, values);
},
getData: function (key) {
if (localStorage.getItem(key) != null) {
return JSON.parse(localStorage.getItem(key));
} else {
return false;
}
},
updateDate: function (key, newData) {
if (localStorage.getItem(key) != null) {
var oldData = JSON.parse(localStorage.getItem(key));
for (keyObj in newData) {
oldData[keyObj] = newData[keyObj];
}
var values = JSON.stringify(oldData);
localStorage.setItem(key, values);
} else {
return false;
}
}
}