cannot convert value of type 'Anyobject!' to expected argument type 'Int'
<p>I am trying to compare an Int with a JSON object but I encounter converting error. user_id is an Int and I also tried Int(sharedID) but it didn't work as well.  So how can I compare sharedID with user_id
Thank you.</p>

<pre><code> let task = NSURLSession.sharedSession().dataTaskWithRequest(request, completionHandler: { (data:NSData?, response: NSURLResponse?, error:NSError?) -&gt; Void in

        dispatch_async(dispatch_get_main_queue()) {

            if error != nil
            {
                return
            }

            do {
                let json = try NSJSONSerialization.JSONObjectWithData(data!, options: .MutableContainers) as? NSDictionary

                self.homeShareResults.removeAll(keepCapacity: false)

                self.shareTableView.reloadData()

                if let parseJSON = json {

                    if let friends  = parseJSON["checkSharedImage"] as? [AnyObject]
                    {
                        for friendObj in friends
                        {

                            let sharedID = (friendObj["id"])

                            if sharedID == user_id {...}
</code></pre>