Optional String added to output - Swift
<p>Been working on pulling data from an API, finally got that to work (I believe correctly) but when I print out variables within the dictionary, "Optional" gets added to the string</p>

<pre><code>        do {
            let jsonResult = try NSJSONSerialization.JSONObjectWithData(data!, options:NSJSONReadingOptions.MutableContainers) as? NSDictionary
            print(jsonResult)
            if (jsonResult != nil) {
                if let players = jsonResult?["players"] as? [Dictionary&lt;String, AnyObject&gt;] {
                    for player in players {
                        let personID = player["name"]
                        print(personID)
                    }
                }
            } else {
                print("No Data")
                // couldn't load JSON, look at error
            }
        }
</code></pre>

<p>Sample of the JSON Output:(note I cut this down and used only the first element)</p>

<pre><code>Optional({
players =     (
            {
        name = "Derek Anderson";
    },
</code></pre>

<p>Print statement:</p>

<pre><code>Optional(Derek Anderson)
</code></pre>

<p>My assumption here is that its printing the Optional Dictionary and then grabbing the "players" name. Meaning I haven't pulled just that name out. I've pulled the name out of the players array, not the Optional.</p>

<p>I feel like I may be adding that Optional Array in some way though, cant seem to figure this one out!</p>