For string:
\'29 July, 2014, 30 July, 2014, 31 July, 2014\'
How can I split on every second comma in the string? So that my results are:
Not sure if you can do it in a one-liner, but a workaround would be to split on every comma then join consecutive values.
ex:
var str = '29 July, 2014, 30 July, 2014, 31 July, 2014'; var list = str.split(","); var list2 =[]; for (var i=0;i