Convert records to structs