title: How to update swift dictionary value
body: <p>I rewrite this code from php. And I find it difficult to make it work in swift.</p>
  
  <pre><code>var arrayOfData = [AnyObject]()
  
  for index in 1...5 {
      var dict = [String: AnyObject]()
      dict["data"] = [1,2,3]
      dict["count"]  = 0
  
      arrayOfData.append(dict)
  }
  
  for d in arrayOfData {
  
      let data = d as AnyObject
  
      // I want to update the "count" value
      // data["count"] = 8
      print(data);
      break;
  }
  </code></pre>