How to export JavaScript array info to csv (on client side)?
问题 I know there are lot of questions of this nature but I need to do this using JavaScript. I am using Dojo 1.8 and have all the attribute info in array, which looks like this: [[\"name1\", \"city_name1\", ...][\"name2\", \"city_name2\", ...]] Any idea how I can export this to CSV on the client side? 回答1: You can do this in native JavaScript. You'll have to parse your data into correct CSV format as so (assuming you are using an array of arrays for your data as you have described in the question