My phonegap/iOS application has a file named data.js which contains an array. The application works with this array and some changes are stored into it.
Now when the user quits my application I want it to save the changes to the data.js file. Is there any way to do this?
UPDATE This is my array (the only thing in data.js):
var data = [
[0, "A", "B", "0", "0"],
[1, "C", "D", "0", "0"],
[2, "E", "F", "0", "0"],
...
];
SOLVED! I used JSON to stringify my array and save it to the localStorage. It only has to work with Mobile Safari, so this is a good solution. Thanks for giving me the hints that made me solve my problem.