-1
因此,這裏的JSON我有:如果我在字典內的字典內有字典,我將如何訪問其中的信息?
{
"hits": [
{
"recipe": {
"url": "www.test.com"
}
}
]
}
我將如何訪問使用python的URL值,這樣我可以分配「www.test.com」給一個變量?
因此,這裏的JSON我有:如果我在字典內的字典內有字典,我將如何訪問其中的信息?
{
"hits": [
{
"recipe": {
"url": "www.test.com"
}
}
]
}
我將如何訪問使用python的URL值,這樣我可以分配「www.test.com」給一個變量?
在Python
使用:
url = dic["hits"][0]["recipe"]["url"]