I have a javascript array like
["1.A","1.B","1.C","1.D",...,"2.A","2.B",...]
Now I want to remove elements from this array by a specified string. For exm if I specify “1” then it should remove all of “1.A”,”1.B”,”1.C”,”1.D”….How to do this in jQuery.
You could use the native
.filter()function:or with jQuery use the
.grep()method: