title: Swift Decodable parse part of JSON
body: <p>I'm trying to parse a json that looks like this using decodable:</p>
  
  <pre><code>    {
      "count": 1,
      "results": [
          {
              "title": 1,
              "content": "Bla"
          } ]
      }
  </code></pre>
  
  <p>My problem is that I don't want to make a class that has a count property just to be able to use the decoder. I want to parse only the results part I don't care about the count.</p>
  
  <p>So my question is, can decodable.decode somehow only parse a part of the result json. I mean a certain key path instead of the whole json ? And I want to do it using Decodable.</p>
  
  <p>In a nutshell I don't want this:</p>
  
  <pre><code>class IncidentWrapper: Codable{
      var count: Int
      var incident: [Incident]
  }
  </code></pre>
  
  <p>What I would Imagine is to have this:</p>
  
  <pre><code>decodable.decode([Incident].self, from: response.data, forKey: "results")
  </code></pre>
  
  <p>Thanks</p>