title: JS FileReader: Read CSV from Local File & jquery-csv
body: <p>I have a CSV file in the same directory as an html page, and I'd like to use FileReader to read the file contents into a jquery-csv's To Arrays function, but I can't seem to get it to work properly.  I think I understand the asynchrony of this task, but have i depicted it correctly?  Here, I'm trying to output the 2nd cell in the 2nd column.  Thanks for any help.</p>
  
  <pre><code>&lt;script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['timeline']}]}"&gt;&lt;/script&gt;
  
  &lt;script src="https://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
  &lt;script src="jquery.csv-0.71.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  var reader = new FileReader();
  
  reader.onload = function(e) {
    var text = e.target.result;
    var data = $.csv.toArrays(text);
    document.write(data[1][1]);
  
  }
  
  reader.readAsText('data.csv');
  
  
  
  
  &lt;/script&gt;
  </code></pre>