transform a (c)sv file into a javascript object.