I have a csv file which contains the following values:
18/10/2013, news item 1
18/10/2013, news item 2
17/10/2013, news item 3
16/10/2013, news item 4
How do I go about putting this into an array in JavaScript, ordered by date?
Once I have got it into an array, I also need to get the text values.
So far I have something like this:
Function readTextFile(){
var rawFile = new XMLhttpRequest();
Var myArray;
rawFile.open("GET", csvfile, true);
rawFile.onreadystatechange = function(){
if(rawFile.readyState === 4){
if(rawFile.Status === 200 || rawFile.Status === 0)
{
}
}
}
Sorry if the text above is not formatted properly, I am posting from my phone. thanks