I have array:
var data = [];
data.genre = [ 'AAAA', '2', 'CCCc', '3', 'dDdDD' ];
a need to remove all string from array and return only numbers...so above return i need to be:
data.genre = [ '2', '3' ];
I try with this:
alert(data.genre.map(function(x){ return x.replace(/^\d+\.\s*/,"") }));
But nothing is changed...so i need to make whole array remove strings and leave only numbers...this i need to get id with this numbers in my mysql left join genre on id.