How to sort the following dictionary by the value of "remaining_pcs" or "discount_ratio"?
promotion_items = {
'one': {'remaining_pcs': 100, 'discount_ratio': 10},
'two': {'remaining_pcs': 200, 'discount_ratio': 20},
}
EDIT
What I mean is getting a sorted list of above dictionary, not to sort the dictionary itself.