Originally Posted by Dormilich
thatís the whole point. why splitting yourself if JSON.parse() (resp. JSON.stringify()) already does the hard work for you?
var data = localStorage.getItem(tblName);
var objData = JSON.parse("[" + data + "]");
I think this would be easier than storing the brackets inside the string when having to insert new rows. I can just put a comma at the end and insert vs having to worry about that last bracket.
Oh JSON.stringify() will also do this. Yeah I'll just use a temp array when inserting and pulling data out. Thanks for the tip!