I have the following Python array of dictionaries:
myarr = [ { \'name\': \'Richard\', \'rank\': 1 }, { \'name\': \'Reuben\', \'rank\': 4 }, { \'name\': \'Reece\'
I'd do
sortedlist = sorted([x for x in myarr if x['rank']], key=lambda x: x['rank']) + [x for x in myarr if not x['rank']]
bit I guess it could be compressed somehow.