System Configuration : macOS Sierra 10.12.5 ; chrome 60;
I am trying to download JSON data ( response object ) as a json file but when I tried to achive this using browser File() object , it gives error
Failed to construct 'File': Iterator getter is not callable.
below is my code
//`inputData` is the valid response getting from $http.get
var stringifyData = JSON.stringify(inputData);
console.log("stringifyData ", stringifyData);
var file = new File(blob, "filename.json", {type: "text/json;charset=utf-8"});
console.log("file", file);
what is the issue and why I am getting this error. when I use JSON.stringify(inputData, undefined, 4);
then it gives no error and displays proper object in the console.