Use treemap to sort/store the fields of a record.