【发布时间】:2021-12-28 06:02:15
【问题描述】:
我有一个以下 Json 文件格式,其中数据将进行动态更新。 我必须在以下场景中使用 python 解析 Json 文件
如果status: "PASS",那么value的结果应该是maths,q1,q2
请帮我介绍一下这个使用 python 的场景
{
"quiz": {
"sport": {
"q1": {
"question": "Which one is correct team name in NBA?",
"options": [
"New York Bulls",
"Los Angeles Kings",
"Golden State Warriros",
"Huston Rocket"
],
"answer": "Huston Rocket"
},
"status": "BLOCK"
},
"maths": {
"q1": {
"question": "5 + 7 = ?",
"options": [
"10",
"11",
"12",
"13"
],
"answer": "12"
},
"q2": {
"question": "12 - 8 = ?",
"options": [
"1",
"2",
"3",
"4"
],
"answer": "4"
},
"status": "PASS"
}
}
}
【问题讨论】: