I have a simple Dictionary which is defined like:
var dict : NSDictionary = [ 1 : \"abc\", 2 : \"cde\"]
Now I want to add an element into t
if you want to modify or update NSDictionary then first of all typecast it as NSMutableDictionary
let newdictionary = NSDictionary as NSMutableDictionary
then simply use
newdictionary.setValue(value: AnyObject?, forKey: String)