Reputation: 2210
I have a file.json
file which contains an array ["number1", "number2"]
and I'm trying to add "number3"
to that array using javascript. But if I define a variable in js file containing this array and try to edit it, only that variable will be edited, when I'm trying to edit the file itself! It sounds like a simple question, but for some reason I didn't find the answer how to do it. Any help is appreciated!
Upvotes: 1
Views: 147
Reputation: 19251
Upvotes: 3