Completed filtering for categories using name and id