jquery object对象如何排序?在线求助ing
const obj = { "2019-10-11": 0, "2019-10-12": 1, "2019-10-13": 2, "2019-10-14": 1 } let map = new Map() Object.keys(obj).sort((a, b) => obj[b]- obj[a]).map(item => map.set(item, obj[item])) console.log("打印map:",map)