如何从 json 读取 ordereddict

How to read ordereddict from json

我有一个json喜欢,

d = {"id": 1, "company_car": 1, "manufacture_stage": OrderedDict([("id", 4), ("company", OrderedDict([("id", 1), ("name", "BMW"), ("icon", "http://test.com/ta/")]))]), "manufacture_car_stage_status": "Scheduled", "start_datetime": "2019-04-30 17:24:32", "end_datetime": "2019-05-30 17:54:32", "taken_datetime": None, "is_active": true, "manufacture_car_stage_detail": {"assessment_scores": None}, "is_shortlisted": false, "is_rejected": false}

如何从 orderedDict 中获取具有 BMW 值的 name

您访问 OrderedDict 的关键字的方式与在普通字典中的方式相同

d['manufacture_stage']['company']['name']