How do I manipulate nested dictionaries in Swift, e.g. JSON data?

前端 未结 3 974
我在风中等你
我在风中等你 2020-12-09 11:01

I\'m using NSJSONSerialization to parse JSON in a Swift application. However, the returned dictionary consists of a complicated, deeply nested structure, making it impractic

3条回答
  •  萌比男神i
    2020-12-09 11:27

    myDictionary["accounts"] might be an optional. Try: myDictionary["accounts"]?["active"]?

提交回复
热议问题