I have this string
var string = 'foo , bar , "special1,special2,special3" , "random1,random2" , normal , another item'
I want to split this on ,
and keep the things within quotes as is in the array i.e i do not want to split the string within quotes. So the expected output would be
var array = ['foo', 'bar', 'special1,special2,special3', 'random1,random2', 'normal', 'another item']