Here is my relevant jQuery code:
$.get('sampleData.csv', function(data) {
var lines = data.split('\r\n');
The first few line of the sampleData.csv file look like this:
2009,0,2,29.0000
2009,0,6,655.6200
I get 2 errors. On the first line of csv file I get the error
syntax error
On the 2nd line of code I get the error
data.split is not a function
What am I doing wrong?
ETA According to the firebug console, the responseText is the following:
2009,0,2,29.0000\r\n2009,...\r\n2011,10,30,494.3500\r\n
ETA I added an alert of the data before I try splitting it into lines, and I get the following:
[Object XMLDocument]