jquery - open a csv file and turn values into javascript array -
this question has answer here:
how can open .csv file , turn values javascript array.
in classical programming i'd by:
- opening file string
- splitting ,
- close file
i know how split, .split(','), how open , close csv file in javascript or jquery?
$.get(url,function(data)     {         var mainarray = data.split('\n');         for(var i=0;i<mainarray.length;i++)         {             mainarray[i] = mainarray[i].split(',');             // mainarray 2 dimensional array contains csv file              //mainarray[row index][column index]         }     } ); 
Comments
Post a Comment