Created
October 14, 2014 21:56
-
-
Save kulte/ee6eca6eabe201da1033 to your computer and use it in GitHub Desktop.
Swift is very strict about types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let jsonObject : AnyObject! = NSJSONSerialization.JSONObjectWithData(dataFromTwitter, options: NSJSONReadingOptions.MutableContainers, error: nil) | |
if let statusesArray = jsonObject as? NSArray{ | |
if let aStatus = statusesArray[0] as? NSDictionary{ | |
if let user = aStatus["user"] as? NSDictionary{ | |
if let userName = user["name"] as? NSDictionary{ | |
//Finally We Got The Name | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment