param data param sortingHeader export function entityListSortingAccessor ( data , sortingHeader ) { if ( typeof data [ sortingHeader ] === "object" && data [ sortingHeader ] && "label" in data [ sortingHeader ] ) { return data [ sortingHeader ] . label ; } else if ( typeof data [ sortingHeader ] === "string" ) { return tryNumber ( data [ sortingHeader ] ) ; } else { return data [ sortingHeader ] ; } } function tryNumber ( input ? ) { return Number ( input ) || input ; }