的價值,這是我的JSON:排序子類型的字典中的字典由副字典
{"data": [{"L": "Leinster"}, {"RN": "Roscommon"}, {"G": "Galway"}, {"LS": "Laois"}, {"LD": "Longford"}, {"OY": "Offaly"}, {"KK": "Kilkenny"}, {"SO": "Sligo"}, {"C": "Connaught"}, {"CO": "Cork"}, {"M": "Munster"}, {"WD": "Waterford"}, {"CE": "Clare"}]}
我要進行排序,以便在字典將由類似的價值「ABC」被下令:
{"data": [ {"CE": "Clare"},{"C": "Connaught"}, {"CO": "Cork"}, {"G": "Galway"},{"KK": "Kilkenny"}, {"LS": "Laois"},{"L": "Leinster"}, {"LD": "Longford"}, {"M": "Munster"},{"OY": "Offaly"}, {"RN": "Roscommon"}, {"SO": "Sligo"}, {"WD": "Waterford"} ]}
有些想法嗎?試過這Python: sort this dictionary (dict in dict) 但這是排序值。而不是字典中的值。
謝謝!
+1,不會發布我的現在,即使它有點不同它不是最好的:^) –
太棒了!謝謝!! – eligro
@eligro沒問題:) – jamylak