While trying to get a value from a Dictionary
, Xcode is showing me the following error:
Could not find an overload for 'subscript' that accepts the supplied arguments
class func fromDictionary(enterpriseDictionary:Dictionary<String, AnyObject>) -> Enterprise
{
var enterprise:Enterprise = Enterprise()
enterprise.id = enterpriseDictionary["id"] as Int (ERROR OCCURS HERE)
enterprise.name = enterpriseDictionary["name"] as? String ( AND HERE )
return enterprise
}