title: swift json parse returning Optional
body: <p>I am trying to parse a json response in swift and am having a hard time doing the trick. when I reference the top level of the json string, and print the value I get an Optional(&lt;__NSSingleObjectArrayI) and then the value of the json </p>
  
  <p>when printed to console I get:</p>
  
  <pre><code>Optional(&lt;__NSSingleObjectArrayI 0x1c0014180&gt;(
  {
  ack =     (
      Success
  );
  paginationOutput =     (
              {
  </code></pre>
  
  <p>then the rest of the json</p>
  
  <p>I don't know what the optional is doing or why its there but it seems to be hindering the rest of the parsing I am trying to do because when I try to go to the next level of the nested values it always returns nil.</p>
  
  <p>the code doing the parsing is as follows</p>
  
  <pre><code>URLSession.shared.dataTask(with: endpoint) { (data, response, error) in
          do {
              guard let data = data else {
                  return
              }
              guard let json = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? NSDictionary else {
                  return
              }
  
              //print(json)
              print(json.object(forKey: "findCompletedItemsResponse"))
              let dictionary1 = json.object(forKey: "findCompletedItemsResponse")
  
              print(dictionary1)
          } catch let error {
              print(error)
          }
          }.resume()
  </code></pre>