I have an AJAX response like this
"12-02-2017,12-02-2017,11-02-2017,10-02-2017"
and i want convert this response into
var sortDates =["12-02-2017","18-02-2017","11-02-2017","10-02-2017"];
Any questions, please comment.
I have an AJAX response like this
"12-02-2017,12-02-2017,11-02-2017,10-02-2017"
and i want convert this response into
var sortDates =["12-02-2017","18-02-2017","11-02-2017","10-02-2017"];
Any questions, please comment.
You can use split():
var resp = "12-02-2017,12-02-2017,11-02-2017,10-02-2017";
resp = resp.split(',');
console.log(resp);