Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Oliver Pinchbeck
2,732 PointsConverting an Array of Dictionaries
I've been following the Swift Tutorials by Pasan, and found a nice version of my own to work on for the Weather App project.
I'm looking at an API endpoint of car park data, and I think what I'm getting back is an array of dictionaries. I feel like I'm following and translating well from Pasan's demo to my code, but in my latest change I'm making a mistake somewhere. I think I'm converting incorrectly between NSDictionary and NSArray (because Pasan's example uses a dictionary of dictionaries, so I'm not following so directly...
Oliver Pinchbeck
2,732 PointsOliver Pinchbeck
2,732 PointsThe code is short enough I'm just going to copy everything for ease of reference:
ViewController.swift
and ParkingData.swift