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.
For example:
<div class="name"> John Doe </div>
<div class="company"> ABC Company </div>
<div class="name"> Jane Smith</div>
<div class="company"> ABC Company </div>
<div class="name"> Bill Williams </div>
<div class="company"> XYZ Company </div>
<div class="name"> Beth Wilson </div>
<div class="company"> XYZ Company </div>
I'd like the output to show:
ABC Company John Doe Jane Smith
XYZ Company Beth Wilson Bill Williams
Any suggestions on how to group that data??
Thanks.