javascript sort an array alphabetically then group by first letter code example
Example: array sort by alphabetical javascript
users.sort((a, b) => a.firstname.localeCompare(b.firstname))
users.sort((a, b) => a.firstname.localeCompare(b.firstname))