Skip to content

Always getting results undefined #4

Description

@isAlmogK

I'm trying to parse a CSV to JSON but I'm always getting results undefined

This is what I have

 <input type="file" id="csv-file" name="files"/>
$('input').change(function(e) {
        $('input[type=file]').parse({
            config: {
                // base config to use for each file
            },
            before: function(file, inputElem)
            {
                console.log(file);
                // executed before parsing each file begins;
                // what you return here controls the flow
            },
            error: function(err, file, inputElem, reason)
            {
                console.log(err);
                // executed if an error occurs while loading the file,
                // or if before callback aborted for some reason
            },
            complete: function(results, file) {
                console.log("Parsing complete:", results, file);
            }
        });
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions