add secondary sort to array output
<p>I have <a href="http://jsfiddle.net/aaronk85/VNSam/8/" rel="nofollow">this fiddle</a> which was based on the results from <a href="http://stackoverflow.com/questions/11813010/create-array-with-form-data-which-groups-and-sorts-data">this question</a>.  I am trying to extend this further so that I can add a secondary sort so that if total price is the same it then looks to the commission column and whoever has the highest commission will go on top where the total sale price is equal.  Is this possible?  I am also having trouble with getting the commision column to be 2 decimal places.  I have tried doing</p>

<pre><code>var commish = '.text((val.price / 3) + (val.sales*5))'; 
</code></pre>

<p>and in the results section.</p>

<pre><code>$("&lt;td&gt;&lt;/td&gt;");commish.toFixed(2).appendTo($tr);
</code></pre>

<p>But this has not worked.</p>
