Get the higher result(s) from a questionnaire with jQuery
<p>I'm trying to build a questionnaire / personality test with jQuery.
I have an object in the end :</p>

<pre><code>results = {
quality1 : 2,
quality2 : 3,
quality3 : 0,
quality4 : 3,
etc
}
</code></pre>

<p>I then want to retrieve the key with the higher value. No problem if there is only one matching result :</p>

<pre><code>    topScore = 0;
    $.each(results, function(i,val) {
    if ( results[i] &gt; topScore ) {
        topScore = results[i];
        topQuality = i;
    }
});
    console.log('Higher quality : ' + topQuality)
</code></pre>

<p>but what if there are many ? (for instance, in the example, quality2 and quality4)</p>

<p>I'm kind of lost, here...</p>
