Please tell me the way to extract the value of "ranking". Check the image first.
My struct :
struct Result2 : Codable{
let rankings : [Myrankings3]
struct Myrankings3 : Codable{
let ranking : String
}
}
JSON code
do {
let finalResult = try JSONDecoder().decode(Result2.self, from: data!)
print(finalResult)
// I want to get the value of ranking which is of type string
}