Javascript object manipulation with Jquery $.each()
<p>What am I doing wrong here ???</p>

<pre><code>var menu = {
    menuset : {
        first  : false,
        second : false,
        third  : false
    },
    setMenus   : function (selected) {

        var menuCollection = this.menuset;

        $.each(menuCollection, function (key, element) {
            if (selected===key) {
                key=true;
            } else {
                key=false;
            }
        });
    }
}
</code></pre>

<p>When I execute   "menu.setMenus(first)" I want it to set the object like this :</p>

<pre><code>    menuset : {
        first  : true,
        second : false,
        third  : false
    }
</code></pre>

<p>should I be using something other than $.each() ??</p>
