Sort object in ascending order based on numerical value example