+ Start a Discussion
keshin okawakeshin okawa 

N>Help Splitting CSV data correctly

my sample csv contains this code

User,Monthly Income,Age,Debt,Gender,
John Doe,"$30,000.00",35,"$2,000.00",Male,
Mary Smith,"$20,000.00",30,"$900.00",Female,

the code I'm following only has this code for the CSV part

csvAsString = csvFileBody.toString();
csvFileLines = csvAsString.split('\n');
string[] csvRecordData = csvFileLines[0].split(',');

I tried looking for solutions about this problem and the closest I found is this

Does anyone have a better idea/code to deal with this problem?
keshin okawakeshin okawa
@sura I already checked that link but what I'm currently using dynamic fields so I cant directly pass row data.
I just want some code for the filtering of data from csv (probably a better version of my code above)