title: get position in a api swift Codable and Model data
body: <p>i am getting data from an api like this</p>
  
  <pre><code>[
    {
      "internData": {
        "id": "abc123",
        "name": "Doctor"
      },
      "author": "Will smith",
      "description": "Is an actor",
      "url": "https://www",
    },
    {
      "internData": {
        "id": "qwe900",
        "name": "Constructor"
      },
      "author": "Edd Bett",
      "description": "Is an Constructor",
      "url": "https://www3",
    }
  ]
  </code></pre>
  
  <p>I have my model like this</p>
  
  <pre><code>struct PersonData: Codable {
      let author: String?
      let description: String?
      let url: String?
  }
  </code></pre>
  
  <p>But I dont know how to define the "internData", I tried with another Model "InterData" and define id and name like the PersonData, but i get an error, i tried also with [String:Any] but i get an error for the Codable protocol</p>
  
  <p>I am using </p>
  
  <pre><code>let resP = try JSONSerialization.jsonObject(with: data, options: .init()) as? [String: AnyObject]
              print("resP", )
  </code></pre>
  
  <p>in my script of Service/Network</p>
  
  <p>Thanks if somebody knows</p>