Evgenij Reznik
Evgenij Reznik

Reputation: 18594

Process CSV with jquery

I'm trying to process a CSV with jquery-csv:

jQuery(document).ready(function() {
    jQuery.get("file.csv", function(data) {
        array = jQuery.csv()(data);
    });
});

But all I get is this error:

Uncaught TypeError: jQuery.csv is not a function

The paths are definitely right.
Also I can see the csv with just console.log(data).

Has anybody any experience with jquery-csv?

Upvotes: 0

Views: 74

Answers (1)

Bernardo Loureiro
Bernardo Loureiro

Reputation: 453

According to https://github.com/evanplaice/jquery-csv#usage, try this:

array = jQuery.csv.toArray(data);

Upvotes: 1

Related Questions