Your question is not clear. Your post is unformatted. Your code is not separated from your question. How shall the monks assist you when you present them with a dog's breakfast like this?
To the right of this you will see a menu. It contains links, some of them to pages giving guidance to newcomers here. Please respect the place and read and follow the guidelines. I promise you that if you do, you will get more and better help.
Is your input an array of anonymous hashes? Do you know what that means? How would we know, since you don't show real code, nor what you'd like your output to be? If it is, maybe something like the following would help. This will produce a new hash keyed by logID, with the value of each key being an array of runIDs.
my %child_run_id_map = ();
for my $log_entry ( @log_entries ) {
my $log_id = $1 if $log_entry->{'logId'} =~ m/([^\.]+)/;
push @{ $child_run_id_map{ $log_id } }, $log_entry->{'runId'} if $
+log_id;
}
Hope this helps! (but I'm just guessing)
The way forward always starts with a minimal test.
|