I need to decode a JSON to a dictionary. The json has String key and the values are strings or numbers.
let decoder = JSONDecoder()
let dict = try decoder.decode([String: Any].self, from: data)
This throws an exception about Any not being decodable. If I use [String : String] it trows an exception about finding a number when a string is expected.
How to do this right?