0
我必須處理像這樣的字典,或者更多的嵌套字典。 如何訪問「twotwo」等字段?還是有更好的可能性來建模這樣的結構?嵌套字典中的快速訪問字段
let nestedDict = [
"fieldOne": "name",
"fieldTwo": "name",
"fieldThree":
[
[
"twoOne": "some text",
"twoTwo": true,
"twoThree": 1e-40
],
[
"twoOne": "some text",
"twoTwo": true,
"twoThree": 1e-40
]
]
]
你試過'nestedDict [「fieldThree」] [「twoTwo」]'? – Arc676
有一些數組在nestedDict [「fieldThree」] [0] [0] [「twoTwo」]將失敗 – SnowMax