I have a string with a list of items. The items in the list contain strings which represent numbers.
var list = '"One","Two","3,842","3,549","3,653","4,443","3,994","3,935"'
I tried splitting like so:
list.split(',')
// result: [""One"", ""Two"", ""3", "842"", ""3", "549"", ""3", "653"", ""4", "443"", ""3", "994"", ""3", "935""]
Which is not what I intended.
I would like:
["One","Two","3,842","3,549","3,653","4,443","3,994","3,935"]
// or even better:
["One", "Two", 3842, 3549, 3653, 4443, 3994, 3935]
How do I correctly split this string into an array like above?