converting csv to json in js, in progress