var saveJson = function(obj) {
var str = JSON.stringify(obj);
var blob = new Blob( [ str ], {
type: 'application/octet-stream'
});
var url = URL.createObjectURL( blob );
var link = document.createElement( 'a' );
link.setAttribute( 'href', url );
link.setAttribute( 'download', 'data.json' );
var event = document.createEvent( 'MouseEvents' );
event.initMouseEvent( 'click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent( event );
}
var obj = [];
for(var i = 0; i<100000; i++) obj.push(Math.random());
saveJson(obj);