Gets compare function for object orders by ascending or descending based on input param 'orderDirection'
Description
Gets compare function for object orders by ascending or descending based on input param 'orderDirection'