function parseCsv(str, delimiter) {
    if(typeof delimiter === "undefined") {
        delimiter = ",";
    }
    var rawRowArray = str.split("\n");
    // Remove all empty rows:
    var rowArray = new Array();
    for(var i = 0, len = rawRowArray.length; i < len; i++) {
        var row = rawRowArray[i];
        if(row !== "") {
            rowArray.push(row.split(delimiter));
        }
    }
    return rowArray;
}
/*
 Parses a string representation of a csv-file using newline as row delimiter
 and the specified character as column delimiter or ',' by default and returns
 the resulting 2D array
*/
Parses a string representation of a csv-file using newline as row delimiter
and the specified character as column delimiter or ',' by default and returns
the resulting 2D array
Parses a string representation of a csv - file using newline as row delimiter and the specified character as column delimiter or ' ' by default and returns the resulting 2D array
function parseCsv(str, delimiter) {
    if(typeof delimiter === "undefined") {
        delimiter = ",";
    }
    var rawRowArray = str.split("\n");
    var rowArray = new Array();
    for(var i = 0, len = rawRowArray.length; i < len; i++) {
        var row = rawRowArray[i];
        if(row !== "") {
            rowArray.push(row.split(delimiter));
        }
    }
    return rowArray;
}
function parseCsv ( str , delimiter ) { if ( typeof delimiter === "undefined" ) { delimiter = "," ; } var rawRowArray = str . split ( "\n" ) ; var rowArray = new Array ( ) ; for ( var i = 0 , len = rawRowArray . length ; i < len ; i ++ ) { var row = rawRowArray [ i ] ; if ( row !== "" ) { rowArray . push ( row . split ( delimiter ) ) ; } } return rowArray ; }
Parses a string representation of a csv-file using newline as row delimiter
and the specified character as column delimiter or ',' by default and returns
the resulting 2D array
Parses a string representation of a csv - file using newline as row delimiter and the specified character as column delimiter or ' ' by default and returns the resulting 2D array
// Remove all empty rows: