I've defined a custom data model for a User Object in Swift like so: user data model
I've got a function that pulls User data from an API like so: get data from api
Here's the response when calling the same endpoint with Postman: api response
And here's the console debug output from line 75 of my function, showing that I'm actually receiving that data: debug output
So that all looks good as far as I can tell. I'm then using JSONDecoder().decode to decode the jsonData I receive from the api, for which I'm not getting any errors. However, when I'm then printing a field from the returned user object, that field (as well as all others) are "nil": all fields in user object are nil
I'm sure it's something small and stupid but I've spent hours now and can't figure out what it is. Can anyone spot the error and let me know what I'm doing wrong here?
Help much appreciated!!!