ashishkakkad.com
JSON Parsing in Swift Language - iOS 8 - Ashish Kakkad
Here is tutorial about parsing JSON in Swift Language iOS 8 Create a Dictionary of all JSON data: [code language=”obj-c”] let url=NSURL(string:"http://api.androidhive.info/contacts/") let allContactsData=NSData(contentsOfURL:url) var allContacts:Dictionary=NSJSONSerialization.JSONObjectWithData(allContactsData, options: NSJSONReadingOptions.MutableContainers, error: nil) as Dictionary NSLog("%@", allContacts) [/code] Parse the JSON by finding your key: [code language=”obj-c”] let contacts : AnyObject? = allContacts["contacts"] for contacts in ... Read more
Ashish Kakkad