displaying array elements
<p>I am creating a JavaScript array is the following manner:</p>

<pre><code>var selectedColors= { 'Orange' : $("#Orange").val(),
                         'Light Blue' : $("#LightBlue").val(),
                         'Dark Red' : $("#DarkRed").val(),
                         'Dark Blue' : $("#DarkBlue").val()};
</code></pre>

<p>Then loop through each item to see which color was not selected, and then store them in another array:</p>

<pre><code>var colorsNotSelected = [];
$.each(selectedColors, function (key, value) {
    if (value.length == 0)
        colorsNotSelected.push({key:key});
});
</code></pre>

<p>Here I want to display the colors not selected, but doing it the following way display the keys: 0,1,2,3 instead of Orange, Light Blue, Dark Red, Dark Blue.</p>

<p>What am I doing wrong here?</p>

<pre><code>if (colorsNotSelected.length &gt; 0)
    $.each(colorsNotSelected, function (key) { alert(key) });
    return false;
</code></pre>

<p>Any help is much appreciated.</p>
