// Alphabetically const ascending = data.sort((a, b) => a[field].localeCompare(b[field])) // Descending const descending = ascending.reverse()