title: What's the easiest way to parse a JSON in Swift 4?
body: <p>I wrote the following function to do a GET request inside of my macOS  app using Alamofire:</p>
  
  <pre><code>func getContent(room: String) -&gt; String {
  let scriptUrl = "https://klipped.in/api/\(room)"
  Alamofire.request(scriptUrl).responseJSON { response in        
      if let json = response.result.value {
          print("\(json)") // serialized json response
      }
  }
  return "This should return the value of \"content\" in the json response"
  }
  </code></pre>
  
  <p>I now want to parse the json in the most efficient way possible. I googled around ways to do this, but every solution I found seems overly complicated or doesn't run because of type problems.</p>
  
  <p>Is there a simple way in Swift to access the values inside of a JSON without creating a Struct for every response? I'm thinking about something along the lines of:</p>
  
  <pre><code>get-json-value(json, "content")
  </code></pre>
  
  <p>That returns the string value of "content" inside of a json and null if it doesn't exist.</p>