3 ms·
I wanted a quick and dirty to parse a CSV in js the other day and just added square brackets around it and used JSON.parse. Am I alone in this?
by beardyw 2y ago
I wanted a quick and dirty to parse a CSV in js the other day and just added square brackets around it and used JSON.parse.
Am I alone in this?
- gsck 2y agoThat's actually pretty smart. The amount of times I have written a simple CSV parser to correctly handle quoted strings and the like is more times than I have digits when I could just pretend its JSON. Going to make a mental note to try this next time!