I am trying to get data from the following CSV which is in my local folder as bids.csv
:
1, 3000
4, 2500
15, 2000
into an array. I'm using the jquery-csv
library but without success.
Here is my entire code:
<html><head>
<script type="text/JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" ></script>
<script src="jquery-csv.js"></script>
</head>
<body>
<script type="text/javascript">
data = $.csv.toArray('bids.csv');
console.log(data)
</script>
</body></html>
When I go to JS console in chrome, there is indeed an array in the console, but it seems to not have my data that I was looking for, instead a huge amount of guff. I can only assume this is the default array that jquery-csv outputs and that it is not reading my csv for some reason.