Skip to content

Instantly share code, notes, and snippets.

@aladine
Created June 30, 2014 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aladine/5efdc0b33e4d24aecd88 to your computer and use it in GitHub Desktop.
Save aladine/5efdc0b33e4d24aecd88 to your computer and use it in GitHub Desktop.
if let jsonDictionary = jsonDict {
println("json parsed successfully")
let total = jsonDictionary["centres"]!.count
let json_data = JSONValue(jsonDictionary)
if json_data{
for var index = 0; index < total; ++index {
var name = json_data["centres"][index]["name"].string
if name {
//processing value
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment