Sort An Array Of Objects Based On Property Javascript