jQuery: Convert string to array

Saturday, May 3, 2014

I have the following array:



var mystr = "Name[Daniel],Name2[Alguien],Date[2009],Date[2014]";


How can I convert it to an array like this:



var array = ['Daniel','Alguien','2009',2014];






http://ift.tt/1iQMV1E