0
How to write data in json file in JavaScript
All are saying it cannot be done. So how do all websites do this.
4 Respostas
+ 2
in web context, the only way is to use server sided script...
to save json file at user side you must let user download (and save) it manually (you cannot force that for security reasons)...
however, you could handle that way with user side script only, by providing the download to user through base64 encoded / blob conversion of the text file content (the json string)... but that's quite tricky (almost to do it working cross-browsers) ^^
+ 1
And how do you do in apps. Want to save user details in json file. Using React