I want to set values to a range in a jquery dictionary object somthing like this
var temp_dict = {'1-10': 'Woolen', '11-25':'Light Woolen', '26-36':'Light Cotton'}
here the keys 1-10, 11-25, 26-36 is different ranges of temprature. I want to store this in a dictionary and then call them like this :
alert(temp_dict[15]);
so that it checks in the range and returns appropriate result.
is there any way i could achieve this??
DEMO: http://jsfiddle.net/WPXdx/