I'm generating a hash and pushed that hash in an array. The array at the end shows like
$VAR1 = [
{
'Count' => 1,
'maint_wf' => 'WFblabla',
'lines' => {
'line1' => {
'ort' => 'city_x',
'lbz' => 'L1city_x'
}
},
'receive_date' => 'Di, 3 Sep 2013 12:16:43 +0200',
'maint_date' => '02.09.2013',
'calendar' => {
'dtend' => '20130902T0530',
'dtstart' => '20130902T0100'
}
},
{
'Count' => 3,
'maint_wf' => 'WFbla',
'lines' => {
'line3' => {
'ort' => 'city1',
'lbz' => 'L1_city1'
},
'line1' => {
'ort' => 'city2',
'lbz' => 'L1_city2'
},
'line2' => {
'ort' => 'city2',
'lbz' => 'L2_city2'
}
},
'receive_date' => 'Mi, 4 Sep 2013 08:56:35 +0200',
'maint_date' => '03.09.2013',
'calendar' => {
'dtend' => '20130903T0530',
'dtstart' => '20130903T0300'
}
},
...
];
How can I count the duplicate values of the key 'ort' (i.e. how many 'ort' => 'city2' exist?) and then just display the corresponding values of key 'lbz'?