Metawaa Metawaa - 1 year ago 98
jQuery Question

Item in object has two value need the second value jquery

I have an object that has two value "384-768" how can I get the second value for all of the Items. if the item has two value get the highest one if its only one return that one only. how do I get that from the object?

Answer Source

You can get second value using split (it splits strings to array by separating the string with passed argument)


and find in loop maximal element (after converting to integer with parseInt)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download