//1.先定义数组 var cr_json = new Array(); var s_arr_cr = ‘{ id: ‘ + hid_JobTicketID + ‘,fee:‘ + hid_CrossRegionFee + ‘}‘; var arr_cr = eval(‘(‘ + s_arr_cr + ‘)‘); cr_json.push(arr_cr); //排序 cr_json.sort(function (a, b) { return b.fee - a.fee; });
2022-09-25 18:40:23
//1.先定义数组 var cr_json = new Array(); var s_arr_cr = ‘{ id: ‘ + hid_JobTicketID + ‘,fee:‘ + hid_CrossRegionFee + ‘}‘; var arr_cr = eval(‘(‘ + s_arr_cr + ‘)‘); cr_json.push(arr_cr); //排序 cr_json.sort(function (a, b) { return b.fee - a.fee; });