title: Where am I going wrong with converting this code so it does not put the variable in an array?
body: <p>This following snippet of code:</p>
  
  <pre><code>if let dict = json?["Stats"] as? [String:AnyObject] {
  
         if let newdict = dict["biggestWin"] as? [[String : AnyObject]] {
         self.bigWinPlayer1Goals = newdict.flatMap { $0["player1_goals"] as! String!}
          print (self.bigWinPlayer1Goals)
  }
  </code></pre>
  
  <p>outputs:</p>
  
  <blockquote>
    <p>["1"]</p>
  </blockquote>
  
  <p>However, that <code>1</code> is contained within an array - this I do not want.  So I have re-written the code to this:</p>
  
  <pre><code>if let newdict = dict["biggestWin"] as? [String : AnyObject] {
          let bigWinPlayer1Goals = newdict ["player1_goals"] as? String
          print (bigWinPlayer1Goals!)
   }
  </code></pre>
  
  <p>However this does not work, and does not output anything.</p>
  
  <p>Where am I going wrong?</p>
  
  <p>This is the array in question:</p>
  
  <pre><code>["Stats": {
  biggestWin =     (
              {
          "player1_goals" = 1;
          "player2_goals" = 2;
      }
  );
  goalDifference = "-17";
  goalsConceded = 32;
  goalsScored = 15;
  totalDraws = 3;
  totalLosses = 10;
  totalWins = 1;
  winPercentage = "7.14%";
  }]
  </code></pre>
  
  <p>I would like to be able to store <code>player1_goals</code> and <code>player2_goals</code> in two separate variables.</p>