type nsfastenumerationiterator.element aka any has no subscript members
<p>I've updated Xcode from 7 to 8 and Swift from 2.3 to 3. </p>

<p>I'm getting this error at <code>let names = candidate["CandidateName"]!</code>: </p>

<blockquote>
  <p>type nsfastenumerationiterator.element aka any has no subscript members</p>
</blockquote>

<p><a href="https://i.stack.imgur.com/E4pNX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/E4pNX.png" alt="enter image description here"></a></p>

<pre><code>    let url = URL(string: "https://website.com")
    let data = try? Data(contentsOf: url!)
    var tmpValues = try! JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers) as! NSArray
    tmpValues = tmpValues.reversed() as NSArray
    reloadInputViews()


    for candidate in tmpValues {
        if ((candidate as? NSDictionary) != nil) {
            let names = candidate["CandidateName"]!

            //self.values.append(candidate["CandidateName"])
            self.values.append(name!)
            print(name)

        }
    }
</code></pre>