How to convert CSV file to JSON after get file from chooser plugin
wasinr opened this issue · comments
Wasin Raktham commented
Hi!
Anyone know How to convert CSV file to JSON after get file from chooser plugin. Now I got data response back from Chooser plugin but I dont know how to convert it to JSON
my code is
async chooseFile(type) {
this.chooser
.getFile()
.then((file: any) => {
// let filename = file ? file.name : "canceled";
alert(file.data);
alert(JSON.stringify(file.data));
});
}