Ambiguous Use of Subscript (Swift 3)
<p>I am using the subscript in the following code incorrectly for this Firebase data pull, but I can't figure out what I am doing wrong.  I get an error of Ambiguous use of subscript for the <code>let uniqueID = each.value["Unique ID Event Number"] as! Int</code> line.</p>

<pre><code>// Log user in
if let user = FIRAuth.auth()?.currentUser {

       let uid = user.uid
       // values for vars sevenDaysAgo and oneDayAgo set here

       ...

       let historyRef = self.ref.child("historyForFeedbackLoop/\(uid)")
            historyRef.queryOrdered(byChild: "Unix Date").queryStarting(atValue: sevenDaysAgo).queryEnding(atValue: oneDayAgo).observeSingleEvent(of: .value, with: { snapshot in

                if (snapshot.value is NSNull) {
                    print("user data not found")
                }
                else {

                    if let snapDict = snapshot.value as? [String:AnyObject] {

                        for each in snapDict {

                            // Save the IDs to array.
                            let uniqueID = each.value["Unique ID Event Number"] as! Int
                            self.arrayOfUserSearchHistoryIDs.append(uniqueID)
                        }

                    }
                    else{
                        print("SnapDict is null")
                    }
                }
       })
}
</code></pre>

<p>I tried to applying what I learned from this <a href="https://stackoverflow.com/questions/33642059/ambiguous-use-of-subscript-in-swift">post</a>, but I couldn't figure out what I am missing because I thought I was letting the compiler know what type of dictionary it is with the "as? [String:AnyObject]"</p>

<p>Any thoughts or ideas would be greatly appreciated!</p>