I have json as below.
{
"CHF": 1.0064,
"KZT": 0.0027,
"ZAR": 0.0676,
"INR": 0.0136,
"CNY": 0.1456,
"UZS": 0.0001,
"AUD": 0.7062,
"KRW": 0.0009
}
This is nothing but list of currency & their rates.
I am confused how to parse this data.
Usually I was creating Model to parse the json data as below for User data (& not for above case).
struct UserData : Decodable {
var firstName : String?
var lastName : String?
}
& while parsing I have as below.
let globalErrObj = try JSONDecoder().decode(UserData.self, from: data!)
However as this is key value data, I am confused how Model & parsing would be.