export const mapByProperty = (propertyName: keyof T) => (itemToMap: T) => { return itemToMap[propertyName]; };