0
How can I update my data.json file using only javascript without using node.js
I want to know the procedure to save and update the values of the JSON file named data.json with the help of JavaScript. I don't want to use Node.js.
2 odpowiedzi
+ 1
1. Retrieve the json file using fetch
2. Convert the response to a JavaScript object using JSON.parse()
3. Update the JavaScript object
4. Save the object now as a json using JSON.stringify()
0
Thanks for your support.