I have looked through the similar topics in stackoverflow but none of those solutions seem to work for me.
I have an app that fetch video through youtube API . The follo
The problem here is almost certainly that your JSON
is defined as a type that could be an array or a dictionary. With Xcode 7.1 ambiguity enforcement was levelled up, so you need to explicitly cast it to something that can be subscripted by a string. This should sort you nicely:
for video in (JSON as! NSDictionary)["items"] as! NSArray