How to access deeply nested dictionaries in Swift
问题 I have a pretty complex data structure in my app, which I need to manipulate. I am trying to keep track of how many types of bugs a player has in thier garden. There are ten types of bugs, each with ten patterns, each pattern having ten colors. So there are 1000 unique bugs possible, and I want to track how many of each of these types the player has. The nested dictionary looks like: var colorsDict: [String : Int] var patternsDict: [String : Any] // [String : colorsDict] var bugsDict: [String