I have the following list:
mylist = [
{ 'frame': { 'aaa': 50 } },
{ 'frame': { 'bbb': 12 } },
{ 'frame': { 'ccc': 23 } },
{ 'frame': { 'ddd': 72 } }
]
I was hoping to sort the list based on those integer values with different keys 'aaa', bbb', 'ccc', etc.
I have seen this question but the keys are consistent to this problem.
Any help is highly appreciated!
EDIT: My desired output is:
sorted_list = [
{ 'frame': { 'ddd': 72 } },
{ 'frame': { 'aaa': 50 } },
{ 'frame': { 'ccc': 23 } },
{ 'frame': { 'bbb': 12 } }
]