Skip to content

Commit

Permalink
Create Parser.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joh13010 committed Jan 2, 2017
1 parent 40be2a7 commit 1545e47
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var data;

function handleFileSelect(evt) {
var file = evt.target.files[0];

Papa.parse(file, {
header: true,
dynamicTyping: true,
complete: function(results) {
data = results;
console.log(results);
}
});
}

$(document).ready(function(){
$("#csv-file").change(handleFileSelect);
});

0 comments on commit 1545e47

Please sign in to comment.