Is it possible to decode single level JSON into 2 separate models?
问题 I have a JSON response that contains information about a user. { "userId": "123456789", "email": "\"some.email@some.domain.tld", "firstName": "\"foo\"", "lastName": "\"bar\"", "name": "\"foo bar", "bio": "\"boo baz\"", "age": "42" } I'd like to create 2 models, User and Profile from the same JSON, with a single request. I'd then like Profile to be a property on the User struct. At the moment, my standard struct looks like this - struct User: Codable, Equatable { var userId: String var email: