Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: removing duplicates from an array of hashes

by hdb (Prior)
on Apr 17, 2014 at 10:38 UTC ( #1082624=note: print w/ replies, xml ) Need Help??


in reply to removing duplicates from an array of hashes

Using an anonymous hash, not maintaining the original order:

@$ref = values %{{ map { $_->{'id'} => $_ } @$ref }};


Comment on Re: removing duplicates from an array of hashes
Download Code
Re^2: removing duplicates from an array of hashes
by Anonymous Monk on Apr 17, 2014 at 13:23 UTC
    You perlmonks are seriously amazing! Can't thank you enough!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-03-03 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (65 votes), past polls