How can I easily add elements to an array inside a dictionary?
It\'s always complaining with could not find member \'append\' or could not find an overloa
As a simple workaround you can use a NSMutableArray:
import Foundation
var dict = Dictionary()
dict["key"] = [1, 2, 3] as NSMutableArray
dict["key"]!.addObject(4)
I am using effectively such simple solution in my project:
https://github.com/gui-dos/Guigna/blob/5c02f7e70c8ee3b2265f6916c6cbbe5cd3963fb5/Guigna-Swift/Guigna/GuignaAppDelegate.swift#L1150-L1157