📅  最后修改于: 2022-03-11 15:02:03.305000             🧑  作者: Mango
// Alphabetically
const ascending = data.sort((a, b) => a[field].localeCompare(b[field]))
// Descending
const descending = ascending.reverse()