title: Decode Custom Json with Decodable
body: <p>I have this Json:</p>
  
  <pre><code>{   "first": {
      "house": [
        "small"
      ]
  
    },   "second": {
      "house": [
        "small"
      ]   },   "third": {
      "car": [
        "fast",
        "economic"
      ]   },   "fourth": {
      "car": [
        "fast",
        "economic"
      ]   },   "fifth": {
      "car": [
        "fast",
        "economic"
      ],
      "ice": [
        "round",
        "tasty"
      ],
      "tree": [
        "big",
        "small"
      ]   } }
  </code></pre>
  
  <p>I tried to set up a structure with Decodable but I do not get it to work:</p>
  
  <pre><code>struct secondLayer: Codable {
      let exchange:  [String: [String]]
  }
  
  struct decodeJson: Codable {
      let symbol: [String: [secondLayer]]
  
      static func decode(jsonString: String) -    [decodeJson] {
          var output = [decodeJson]()
          let decode = JSONDecoder()
          do {
              let json = jsonString.data(using: .utf8)
              output = try! decode.decode([decodeJson].self, from: json!)
          } catch {
              print(error.localizedDescription)
          }
          return output
      }
  }
  </code></pre>
  
  <p>I get this Error:</p>
  
  <pre><code>Fatal error: 'try!' expression unexpectedly raised an error:
  Swift.DecodingError.typeMismatch(Swift.Array&lt;Any&gt;,
  Swift.DecodingError.Context(codingPath: [], debugDescription:
  "Expected to decode Array&lt;Any    but found a dictionary instead.",
  underlyingError: nil)): file
  /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.74.1/src/swift/stdlib/public/core/ErrorType.swift,
  line 181
  </code></pre>
  
  <p>I tried some modification but I do not get it to work.</p>