What is the data model corresponding to the below json?
{
dog:
{
type: "dog",
logoLocation: "url1"
},
pitbull:
{
type: "pitbull",
logoLocation: "url2"
}
}
This is a dictionary of dictionaries So I tried,
class PhotosCollectionModel: Codable {
var photoDictionary: Dictionary<String, PhotoModel>?
}
class PhotoModel: Codable {
var type: String?
var logoLocation: String?
}
But it is not working. Any help please?