Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^6: Sorting Template Toolkit Array of Hashrefs

by roho (Abbot)
on Jul 23, 2012 at 15:33 UTC ( #983193=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Sorting Template Toolkit Array of Hashrefs
in thread Sorting Template Toolkit Array of Hashrefs

Thanks for your reply. And thanks to my "really, really smart" co-worker who not only suggested sorting in Perl, but also provided an example of how to do it:

my $sorted_results = [ sort { $a->{agendas}->[0]->{agendaDate} cmp $b- +>{agendas}->[0]->{agendaDate} } @$content ];

"Its not how hard you work, its how much you get done."


Comment on Re^6: Sorting Template Toolkit Array of Hashrefs
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983193]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-06 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (69 votes), past polls