Created
June 18, 2014 07:11
-
-
Save owensd/c42d3bd7b8ac4561d12a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if let dict = json as? NSDictionary { | |
| if let blogs = dict["blogs"] as? Dictionary<String, AnyObject> { | |
| if let blogItems : AnyObject = blogs["blog"] { | |
| if let collection = blogItems as? Array<AnyObject> { | |
| for blog : AnyObject in collection { | |
| if let blogInfo = blog as? Dictionary<String, AnyObject> { | |
| let id : AnyObject? = blogInfo["id"] | |
| let name : AnyObject? = blogInfo["name"] | |
| let needspassword : AnyObject? = blogInfo["needspassword"] | |
| let url : AnyObject? = blogInfo["url"] | |
| println("Blog ID: \(id)") | |
| println("Blog Name: \(name)") | |
| println("Blog Needs Password: \(needspassword)") | |
| println("Blog URL: \(url)") | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment