Answer the question
In order to leave comments, you need to log in
Connecting a JSON file to JS, how to change and overwrite?
I need to connect a json file and run it through Javascript, change it and write it back with the changes.
Tell me how to connect the JSON file locally? How to save the changed Json file?
Answer the question
In order to leave comments, you need to log in
JS in the browser can't write to files. This is what JS can do in Node.
So:
1. Install a node
2. Connect the fs module
3. Read the file, make changes, write back
The node has good documentation and a fairly simple api.
Based on the wording of the question, you will need to read a short overview lecture on the basics of JS. I'm afraid there is no specific answer to your question that would fit in one paragraph.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question