title: XCode Error Message: Ambiguous use of ’subscript'
body: <p>If I run my code in xcode simulator everything is fine, but once I try to run it on iphone I get this error message:</p>
  
  <p><a href="https://i.stack.imgur.com/3x6Wi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3x6Wi.png" alt="enter image description here"></a></p>
  
  <p>This is my code:</p>
  
  <pre><code>let myJsonArray = try JSONSerialization.jsonObject(with: content, options: JSONSerialization.ReadingOptions.mutableContainers) as AnyObject
  let myJson = myJsonArray[0] as AnyObject
  let price_usd_str = myJson["price_usd"] as! String
  
  price_usd = (NumberFormatter().number(from: price_usd_str)?.doubleValue)!
  </code></pre>
  
  <p>What exactly is wrong with it? Like I said it's fine in xcode alone I only get this error when wanting to play this on a phone.</p>