Sort fields in struct