Created
February 14, 2018 14:32
-
-
Save vartana/11aef99456bb4224142b67fac377df65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test_array = [["name1", 2, 3], ["name2", 4, 5], ["name3", 6, 7], ["name4", 8, 9], ["name5", 10, 11]]; | |
var csv = test_array.map(function(d){ | |
return JSON.stringify(d); | |
}) | |
.join('\n') | |
.replace(/(^\[)|(\]$)/mg, ''); | |
dl = "data:text/csv;charset=utf-8," + csv | |
window.open(encodeURI(dl)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment