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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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