I have the following simple JSON:
{
"201" :
{
"countryName" : "Albania",
"countryCode" : "AL"
},
"202" :
{
"countryName" : "Andorra",
"countryCode" : "AD"
},
...
}
The inner dictionary simply becomes:
struct Mid : Codable
{
var countryName: String
var countryCode: String
}
But then I'm stuck. How do I represent the outer dictionary?
I want to end up with a dictionary of Mid
objects with String
keys "201"
, "202"
, ...