var list = [ {id:2,name:'bar'}, {id:3,name:'boo'}, {id:1,name:'foo'}, ] // 昇順: a.id > b.id // 降順: a.id < b.id list.sort((a,b)=>{ return a.id > b.id }); console.log(list);//[Object {id=1, name="foo"}, Object {id=2, name="bar"}, Object {id=3, name="boo"}]