我的应用程序中的 ajax 请求返回了这个 json,
{"info": {"pat_gender": "f",
"obtained_pmh": true,
"organized": false,
"hpi_selected_alleviating": true,
"greeted_patients": true,
"echoed_patients_words": false,
"allowed_pt_to_finish_thoughts": true,
"grade": "Excellent"
} }
我想遍历项目,但分组排序真假字段,即
{"info": {
"pat_gender": "f",
//from here GROUP1
"obtained_pmh": true,
"organized": false,
"hpi_selected_alleviating": true,
//GROUP2
"greeted_patients": true,
"echoed_patients_words": false,
"allowed_pt_to_finish_thoughts": true,
"grade": "Excellent"
} }
我想让第 1 组中的字段在两个列表(True 和 false)中排序,并且 group2 也以相同的方式排序。我怎样才能做到这一点?