Did you understand?
my $records = $self->{queryObj}->result() is not a data structure, it isn't output from
Data::Dumper, it isn't something anybody except you can replicate -- there is no sense in trying to write code when we're guessing at the actual value of $records, without knowing the actual value of $records any code written to deal with it is a guess ie nonsense