How do I sort an array of hashes by a value in the hash?

url_hash.sort_by {|k| k["title"]}

http://stackoverflow.com/questions/3154111/how-do-i-sort-an-array-of-hashes-by-a-value-in-the-hash

posted @ 2015-07-16 18:44  冰凌花花~  阅读(100)  评论(0)    收藏  举报