Search code examples
javascriptjqueryjsonlocal

How to write to local JSON file using jQuery


Please note; everything I'm doing here is local. I've been looking for and testing ways to write to a JSON from a JS file using jQuery. I've found ways that use PHP, but I'm not fluent in PHP and would rather stay away from it for now.

Is there any function in jQuery, or JavaScript, that can let me easily write to JSON files?

Thanks in advance, Benjamin.


Solution

  • If you are going with browser then it will not work in any way. If you are using nodejs on local system then you can do it with nodejs. With only remote side script it is not possible. With javascript running in browser you can only perform browser based task.