I have the following Python array of dictionaries:
myarr = [ { \'name\': \'Richard\', \'rank\': 1 }, { \'name\': \'Reuben\', \'rank\': 4 }, { \'name\': \'Reece\'
You can use function in key param:
for ass sorting:
sorted_master_list = sorted(myarr, key=lambda x: x.get('rank'))
or to desc:
sorted_master_list = sorted(myarr, key=lambda x: -x.get('rank'))
Also you can read about sorted function here http://wiki.python.org/moin/HowTo/Sorting