Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi perlmonks,
I am having a array of hash as below. In that I want to sort decending order based on the value 'hyundai'. Any one have any idea about this ?
my $ArrayofHash = [ { 'TaskA' => { 'maruti' => '20', 'honda' => '25', 'zen' => '25', 'hyundai' => '35', 'ford' => '22', 'toyota' => '11' } }, { 'TaskB' => { 'maruti' => '11', 'honda' => '22', 'zen' => '33', 'hyundai' => '33', 'ford' => '24', 'toyota' => '16' } }, { 'TaskC' => { 'maruti' => '12', 'honda' => '22', 'zen' => '33', 'hyundai' => '44', 'ford' => '55', 'toyota' => '66' } } ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need to sort array of hash
by dsheroh (Monsignor) on Dec 22, 2018 at 11:19 UTC | |
|
Re: need to sort array of hash
by kcott (Archbishop) on Dec 22, 2018 at 11:52 UTC | |
|
Re: need to sort array of hash
by BillKSmith (Monsignor) on Dec 22, 2018 at 15:28 UTC | |
by dsheroh (Monsignor) on Dec 23, 2018 at 11:54 UTC | |
by BillKSmith (Monsignor) on Dec 24, 2018 at 02:31 UTC | |
|
Re: need to sort array of hash
by hippo (Archbishop) on Dec 22, 2018 at 10:57 UTC | |
by Anonymous Monk on Dec 22, 2018 at 11:10 UTC | |
by hippo (Archbishop) on Dec 22, 2018 at 11:43 UTC |