If you want to check the data fromat coming out from the REST API, you can use the following code
let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: [Any]]
let typeString = String(describing: type(of: json))
print(json)