How To Sort An Array Of Objects In Javascript