Useful for snippets if you want to merge in additional data
Calling the downloadData()
function will immediately create a file download
(as though you right clicked to download the file within the browser)
for the data you provide - in JSON format.
When you run this script:
- A file dialog opens up requesting a file
- It reads the file in a plain text
- It parses the file as JSON
- you can then do what you want with the JSON