如何获取 JSON 数据节点中的元素数量?
JSON:
{
"result":[
{
"run":[
{
"action":"stop"
},
{
"action":"start"
},
{
"action":"start"
}
],
"find":true
}
]
}
我需要从节点 data['result'][0]['run']
中获取元素的数量。它应该是 3,但我在 Python 中找不到如何做到这一点。