In this article we are going to discuss how to download JSON array as File using Jquery. In some scenario we need to download json file in browser itself, top follow this article we will discuss how easily we do it. Please go though our previous article of Jquery How to read external JSON file in Jquery AJAX.
What We do here ?
In this example we create a JSON object then convert it into a JSON String and then to BLOB object, then downloaded as Text file from Browser using jQuery.
<input type="button" value="Download Json" onclick="DownloadJson()" />
Downloading JSON array as File using jQuery
- Here we create a dummy student list.
- Then it convert to Json string then it store as blob object