📅  最后修改于: 2022-03-11 14:48:19.042000             🧑  作者: Mango
var items = [
{ name: "Edward", value: 21 },
{ name: "Sharpe", value: 37 },
{ name: "And", value: 45 },
{ name: "The", value: -12 },
{ name: "Magnetic", value: 13 },
{ name: "Zeros", value: 37 }
];
items.sort(function (a, b) {
return a.value - b.value;
});