(This is for local use only, using WAMP) I have some Javascript's that create a array containing some string and objects. I would like to save this array to a file, so that i can later load it into another JavaScript.
I have seached Google all night, but can seem to find any way of doing this :(
use JSON.stringify(myarray) first, then you can use AJAX to send the data to the server. You can use file_put_contents(php) to save the file to the server's disk...you can retrieve the array and use it later using JSON.parse(array_from_file);
You can send json to php server and from there you can write it to a json file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With