Converts CSV to an array of objects in JSON