list操作的有关问题

list操作的问题
从后来返回一个list的话,现在在页面table里显示出来,但是回传的list排序有些问题,我想根据list[i].id和list[i].prop两个字段来进行排序。
举例:
list里有5条数据
{id:01,prop:0,belong:Scott,com:Company A},
{id:01,prop:0,belong:Scott,com:Company A},
{id:02,prop:0,belong:Smith,com:Co.B },
{id:01,prop:1,belong:Anderson,com:Company A},
{id:01,prop:1,belong:Scott,com:Company A}
页面效果:
list操作的有关问题
如何操作此list可以达到如上页面效果

------解决方案--------------------
问题阐述不清晰

你是要对 list的数据进行排序
还是要把list的数据 变成 table?
------解决方案--------------------


 <style>
    table{ border-collapse:collapse; }
    td{border:1px solid #000; }
</style>
<table border=1 id="t1" >
<tr>
<td>id</td><td>prop</td><td>belong</td><td>com</td>
</tr> 
</table> 
 
 
<script>
var ds=[{id:'01',prop:'0',belong:'Scott',com:'Company  A'},
{id:'01',prop:'0',belong:'Scott',com:'Company  A'},
{id:'02',prop:'0',belong:'Smith',com:'Co.B'},
{id:'01',prop:'1',belong:'Anderson',com:'Company  A'},
{id:'01',prop:'1',belong:'Scott',com:'Company  A'}];
ds.sort(function(a,b){
 return a.id+a.prop >  b.id+b.prop ?1:-1 
});
t1=document.getElementById('t1');
var cls='id prop belong com'.split(' ');
for(var i=0;i<ds.length;i++){
 var r= t1.insertRow(-1);
for(k in ds[i]) r.insertCell(-1).innerHTML=ds[i][k];
}

function mergeCell(tb,i){
    var rs=tb.rows,ac,acv;
    if(!rs.length) return;
    for(var r=0;r<rs.length;r++){
        var cs=rs[r].cells, c=cs[i];
        if( !ac
------解决方案--------------------
 (c.innerHTML!=ac.innerHTML ) ){
            ac=c;