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

原文地址:https://www.cnblogs.com/iwangzheng/p/4652172.html