I have this Dictionary
var detailItem: Dictionary?
I am trying to get the Any and convert it to a String and then assign to UILabel like so:
self.firstName.text = detail!["firstname"] as? String
Fatal error: Unexpectedly found nil while unwrapping an Optional value
Which I dont understand because first name is not nil, its James (not "James") but just James, if I print it I can see it:
print(detail!["firstname"])
What am I doing wrong?
How to do I assign Any to UiLabel text?