I have Excel data converted to CSV. The original cells which contained commas are double-quoted in the CSV. For example, one row might look like:
Multiple Choice,"For a student that needing help, a teacher could:",Make it easier,Have them read independently,Use video,Summarize each paragraph,C
Without such quoted text containing commas I would just use JavaScript to break the string into array elements.
var theArray = theString.split(',');
But the fact that some of the pieces could be quoted and contain commas makes that difficult.
Is there a simple JavaScript way to break up this kind of text into Array elements, so in this case, the elements would be:
- Multiple Choice
- For a student that needing help, a teacher could:
- Make it easier
- Have them read independently
- Use video
- Summarize each paragraph
- C