at the moment i save this data at my local storage
var getData =
{
id:0,
cost:0,
index: 0,
isunlocked:false,
}
then when i get the data it looks like this {“id”:0,“cost”:0,“index”:0,“isunlocked”:false}
but this is in a string formate do i need to cut the string in peaces and then acces or can i just do
tempdata = getdata
myid = tempdata.id;
change
but this is in a string formate do i need to cut the string in peaces and then acces or can i just do this
to
but this is in a string format, do i need to cut the string in pieces and then access or can i just do this:
you had some misspelled things and missing punctuation, are you not good with english?
it was an quick type out
but here is solution
JSON.parse this can be used change the type of an jsonstring to an object