export function sortArrayByProperty>( arrayToSort: readonly T[], property: keyof T, ) { return [...arrayToSort].sort((a, b) => a[property].localeCompare(b[property])); }