Reputation: 2103
I have below json object. i am parsing json and storing this as disctionary. now i want to get these array from disctionary but when i am using objectForKey("upcomingAppointments") it given me nothing
{
"upcomingAppointments": [],
"upcomingFollowUps": [],
"followUps": []
}
Upvotes: 0
Views: 40
Reputation: 7233
Try this:
var dictionary = //NSDictionary from somewhere...
if let upcomingAppointments = dictionary["upcomingAppointments"] as? NSArray {
//Process your appointments here.
}
//Same goes for other such json fields.
Upvotes: 1