title: How do I decode JSON in Swift when it's an array and the first item is a different type than the rest?
body: <p>Say the JSON looks like this:</p>
  
  <pre><code>[
      {
          "name": "Spot",
          "breed": "dalmation"
      },
      {
          "color": "green",
          "eats": "lettuce"
      },
      {
          "color": "brown",
          "eats": "spinach"
      },
      {
          "color": "yellow",
          "eats": "cucumbers"
      }
  ]
  </code></pre>
  
  <p>Where the first item in the JSON responses you get back from the API are always a dog, and all the ones after that are always turtles. So item 0 is dog, items 1 through N-1 are turtles.</p>
  
  <p>How do I parse this into something that I can read, like:</p>
  
  <pre><code>struct Result: Codable {
      let dog: Dog
      let turtles: [Turtle]
  }
  </code></pre>
  
  <p>Is it possible?</p>