How to download JSON file from internal variable?

I have an internal javascript variable that I would like to make available to end-users via a download link -- which they would click on to get a JSON file of that variable's value. I've found a few different libraries (e.g. FileSaver.js) and Fiddle with an example (but can't figure out how to incorporate that into a p5 sketch). Any pointers/suggestions would be much appreciated!

Tagged:

Answers

Sign In or Register to comment.