I want to create a global array that i can manipulate in all JS scripts pages... This is the array structure :
myArray = new Array();
myArray[i] = new Array(2);
myArray[i]["id"] = id;
myArray[i]["title"] = title;
i++;
So, i thought about the NKSettings class. Did I think well ? ^^
I tried this :
...
settings.setValueForKey(myArray, "array");
var my_array = settings.getValueForKey("array");
NKLog(my_array);
I got a JSON object (?) :
"9":{"id":944,
"title":"l’iPad explose les records de vente",
etc...
But now, i don't know how to use it... I tested :
NKLog(my_array[0]); >> "{"
NKLog(my_array[0].id); >> undefined
NKLog(my_array["0"].id); >> undefined
NKLog(my_array["0"]["id"]); >> undefined
How can I get my array ?
I'm little bit frustrated... I need help