I want to save a JSON object to a file at client to persist it for future usage, I have tried following line
window.open(\"data:text/json;charset=utf-8,\" + es
If you want to persist data, then use a storage API, you can't play games with the user's filesystem.