{"version":"1.0","type":"rich","title":"a simple function to export a JSON file","description":"This example demonstrates a minimal JavaScript function that triggers a browser save dialog for any JSON data, producing a downloadable file with a user-specified name. The code converts the input data into a formatted string using `JSON.stringify`, wraps it in a Blob with the `application/json` MIME type, and creates an object URL via `URL.createObjectURL`. It then programmatically clicks a temporary anchor element with a `download` attribute and cleans up the element afterward. The function accepts arbitrary data, such as arrays or text, as shown in the comment example `saveJSON([1,2,3], 'anArray')`.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-3951b04c1e0725445774?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}