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:

  1. opening file string
  2. splitting ,
  3. 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

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -