I don't need to constuct a json then download, I already have the url of the json, I just need to download as a file. I've been followinw some answers of other threads but I can't get it. Some answers use externals libraries, jquery, etc. Is there a clean solution via javascript?
window.location.href = "my_url";
won't do the trick. I can't manage to download the file... only it shows throught the browser. For example, I tried this: How to trigger a file download when clicking an html button or javascript
<form method="get" action="file.doc">
<button type="submit">Download!</button>
</form>
But don't know how to force the download with a json type file