I want to load an online json file into my application, but I am running into this error:
typeMismatch(Swift.Array, Swift.DecodingError.Context(codi
The JSON is represented by your Initial struct, not an array of Dates.
Initial
Dates
Change:
let jsondata = try decoder.decode([Dates].self, from: detailData)
to:
let jsondata = try decoder.decode(Initial.self, from: detailData)