I just want to sort the dictionary by the values but little different way.
Here is my dictionary
issues = {
1: {'title': 'Title 1','level': 'low'},
2: {'title': 'Title 2','level': 'medium'},
3: {'title': 'Title 3','level': 'high'},
4: {'title': 'Title 4','level': 'low'},
5: {'title': 'Title 5','level': 'medium'},
6: {'title': 'Title 6','level': 'high'}
}
I want to sort the above issues by its level (low, medium, high).
sorted_issues = {
1: {'title': 'Title 1','level': 'low'},
4: {'title': 'Title 4','level': 'low'},
2: {'title': 'Title 2','level': 'medium'},
5: {'title': 'Title 5','level': 'medium'},
3: {'title': 'Title 3','level': 'high'},
6: {'title': 'Title 6','level': 'high'}
}
I got many examples but all those had only one value in the value section. But here values are not single value its dictionary
Thanks in advance.