Sort for categories and sub_categories dropdowns.