Saoud M. Rizwan
Aug 8, 2017 · 1 min read

Make your page structs like so:

struct Page: Codable {    let pageid: String    let title: String    let extract: String    let thumbnail: [Thumbnail]}struct Thumbnail: Codable {    let original: String}

All you need to do is first manually decode the returned JSON data to an array of ‘page’ JSON Data objects. Then you can use JSONDecoder to decode each JSON Data object to Page.self

    Saoud M. Rizwan

    Written by

    iOS Developer

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade