I am storing screen resolutions in an array and I want to lookup for the correct resolution range that is relevant to the user's viewport (i have the width x height
of the current window)
Given this JS array which holds JSON objects:
[
{width:100,height:200,data:'myData1'},
{width:101,height:300,data:'myData2'}, //<-- This one!
{width:301,height:400,data:'myData3'},
]
How can I lookup for the entry which answers the RANGE of width=160 and height=240 [this range exists in the 2nd entry]
Please ignore the correct array/JSON structure, its just a pseudo code to emphasis what I need to perform.