javascript - How to strip text values from an array result so have only numeric value -


how extract value database item in array contains both text , value want.

for example first item in array:

resultarray[i].selector_sliderdata_attributes 

is value: data-time-build='100'

the second item has value: data-time-build='450' , on.

i want able extract 100 , 450 in js function , use compare values in isotope slider.

hello can use regex:

var numonly = yourstring.replace(/[^0-9]/g, ''); 

hope helps.


Comments

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -