title: Swift 4 decodable nested json with random key attributes
body: <p>I'm having problems decoding json. I've followed lots of tutorials but non use complex json structures. For simplicity I minimized the code and use Dog as example.</p>
  
  <p>In following json i'm mostly only interested in the Dog structs. <strong>The json "Data" attribute contains random dog names</strong>. So I cannot use coding keys because I dont know the attribute name.
  </p>
  
  <pre><code>{
       "Response": "success"
       "BaseLinkUrl": "https://wwww.example.com",
       "Data": {
           "Max": {
               "name": "Max",
               "breed": "Labrador"
           },
           "Rocky": {
               "name": "Rocky",
               "breed": "Labrador"
           },
           ...
      }
  }
  </code></pre>
  
  <p>I have following structs:</p>
  
  <pre><code>struct DogResponse : Decodable {
      let data : DogResponseData
  
      enum CodingKeys: String, CodingKey {
          case data = "Data"
      }
  }
  
  struct DogResponseData: Decodable {
      let dog: Dog //this is a random variable name
  
      enum CodingKeys: String, CodingKey {
          case dog = "??random_variable_dog_name??"
      }
  }
  
  struct Dog: Decodable {
      let name: String
      let type: String
  
      enum CodingKeys: String, CodingKey {
          case name
          case type = "breed"
      }
  }
  </code></pre>
  
  <p>collecting the Dog structs: </p>
  
  <pre><code>let dogResponse = try JSONDecoder().decode(DogResponse.self, from: data)
  print(dogResponse)
  </code></pre>
  
  <p>What do I need to do in my "DogResponseData" struct for swift to recognize a random variable that contains my Dog struct?</p>