Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
let data = """
{
"response": [
{
"name": "Kitty",
},
{
"name": "Doggy",
}
]
}
""".data(using: .utf8)!
struct Animal: Decodable {
let name: String
}
struct AnimalResponse: Decodable {
let response: [Animal]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment