title: Api request IOS using flurry api
body: <p>I have the following code that makes an API request to a flurry.com API endpoint and decodes the request.</p>
  <pre><code>let url = URL(string: bookStarRateDomainUrl)!
  
  let task = URLSession.shared.dataTask(with: url, completionHandler: { (data, response, error) in
    if let error = error {
      print(&quot;Error with fetching book star rates: \(error)&quot;)
      return
    }
    
    guard let httpResponse = response as? HTTPURLResponse,
          (200...299).contains(httpResponse.statusCode) else {
      print(&quot;Error with the response, unexpected status code: \(response)&quot;)
      return
    }
  
    if let data = data,
      let flurryItems = try? JSONDecoder().decode(FlurryItem.self, from: data) {
      completionHandler(flurryItems.results ?? [])
    }
  })
  task.resume()
  </code></pre>
  <p>The problem is that I cannot use .decode(FlurryItem.self, because the values I get back from the API endpoint is this:</p>
  <pre><code>[{
       dateTime:2020-06-05 00:00:00.000-07:00
       event|name:BookStarRate
       paramName|name:bookId
       paramValue|name:why-buddism-is-true
       count:3
  }]
  </code></pre>
  <p>notice how the variable name is &quot;paramName|name&quot;. The | makes it impossible to name a variable for that item. What can I do instead?</p>