title: Parsing JSON in Swift from Wix
body: <p>Hi I am quite new to parsing Json. I have a wix website that I am trying to get info from.
  I am using google.com as an example.</p>
  <p>Using the below request, it returns a huge chunk of information in html format I believe:</p>
  <pre><code> struct Response: Codable {
      let item: String
    }
    
  
   func getNews() {
   let urlString = &quot;https://google.com&quot;
   if let url = URL(string: urlString) {
      URLSession.shared.dataTask(with: url) { data, response, error in
          if let data = data {
              do {
                  //trying to decode as json and returns json if so
                  let res = try JSONDecoder().decode(Response.self, from: data)
                  print(res.item)
              } catch let error {
                  //prints an error which is currently 
                  //dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: 
                    &quot;The given data was not valid JSON.&quot;, underlyingError: Optional(Error 
                     Domain=NSCocoaErrorDomain Code=3840 &quot;Invalid value around character 0.&quot; 
                     UserInfo={NSDebugDescription=Invalid value around character 0.})))
  
                  print(error)
              }
              //This I believe prints the html.
              print(String(data: data, encoding: .utf8)!)
          }
       }.resume()
     }
   }
  </code></pre>
  <p>My ultimate goal is to filter this json or html whatever is easiest and get specific items from it. How do I best go about this?</p>