这是我的杰森:
{"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"} ]}
some ideas? tried this Python: sort this dictionary (dict in dict) but this is sorting values. not the values in the dict.
谢谢!