Finding Keys in associative arrays with JavaScript
<p>With this associative array, I would like to find a specfic key:</p>

<pre><code>var veggie_prices = new Array();
veggie_prices["serves6"] = 20;
veggie_prices["serves8"] = 25;
veggie_prices["serves10"] = 35;
</code></pre>

<p>If I loop through the array, I can find the values with:</p>

<pre><code>var x = veggie_prices[i].value;
</code></pre>

<p>but how should the key be found ?</p>

<pre><code>var y = veggie_prices[i].key;
</code></pre>