Need to group a list of items using jquery
<p>I have a list of items which includes a person and the company they work for. I need to be able to group the list by company, and then display all the people who work for that company.</p>

<p>For example:</p>

<pre><code>&lt;div class="name"&gt; John Doe &lt;/div&gt;
&lt;div class="company"&gt; ABC Company &lt;/div&gt;
&lt;div class="name"&gt; Jane Smith&lt;/div&gt;
&lt;div class="company"&gt; ABC Company &lt;/div&gt;

&lt;div class="name"&gt; Bill Williams &lt;/div&gt;
&lt;div class="company"&gt; XYZ Company &lt;/div&gt;
&lt;div class="name"&gt; Beth Wilson &lt;/div&gt;
&lt;div class="company"&gt; XYZ Company &lt;/div&gt;
</code></pre>

<p>I'd like the output to show:</p>

<p>ABC Company
  John Doe
  Jane Smith</p>

<p>XYZ Company
   Beth Wilson
   Bill Williams</p>

<p>Any suggestions on how to group that data??</p>

<p>Thanks.</p>
