Posted By

tonic on 04/28/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

imit
webstic


Sort an array of hashes in Ruby


 / Published in: Ruby
 

URL: http://snippets.dzone.com/posts/show/2470

  1. my_arr.sort_by { |my_item| my_item[:my_key] }

Report this snippet  

You need to login to post a comment.