// 排序
function compare(property){
return function(a,b){
var value1 = a[property];
var value2 = b[property];
return value1 - value2;
}
}
console.log(data.data.dev_info.sort(compare('dev_addr')));
// 排序
function compare(property){
return function(a,b){
var value1 = a[property];
var value2 = b[property];
return value1 - value2;
}
}
console.log(data.data.dev_info.sort(compare('dev_addr')));