How can I compare key with a fixed number
<p>I have a JavaScript object like the following</p>

<pre><code> var items =
    {
        "k1": "value1",
        "k2": "value2",
        "k3": "value3"
    };
</code></pre>

<p>How can I compare key with a fixed number to get key and value of ("k2", value2) ?
Example: k1 = 9, k2 = 15, k3 = 23; fixed number (fix=12) </p>

<p>I will loop through all items to get only my key and value:</p>

<pre><code>function(fix) {
  for(var key in items) {
     if (fix &gt; k1 || fix &lt;= k2) {
        document.write( key + " : " + items[key] + "&lt;br /&gt;");
     }
  }
}
</code></pre>

<p>How can I do that ?</p>
