Hey guys I'm using CSVImporter framework to import CSV files on IOS development. I already search through the documentation about importing multiple data into array.
This is from their site
let path = "path/to/Hogwarts/students"
let importer = CSVImporter<Student>(path: path)
importer.startImportingRecords { recordValues -> Student in
return Student(firstName: recordValues[0], lastName: recordValues[1])
}.onFinish { importedRecords in
for student in importedRecords {
// Now importedRecords is an array of Students
}
}
which shows that the data from 1 row could be separated into recordValues array
and this is my code , you can see that on my code the recordValues is not divided into array, instead all of the data in a row is combined into recordValues[0] and still separated by ; (semicolon). I can overcome this by separating the string with semicolon symbol, but has anyone ever had this issue? I want to know the problem on my code.