2016-12-29 34 views
-8

downloaed json data is in the format of dictionary and within that dictiionary i need data. so someone please help me to resolve this error(Type any? has no members)类型的任何具有SWIFT 3

let dict = booksArray[indexPath.row] 

title.text = dict["im:name"]!["label"] as? String 
descLabel.text = dict["im:releaseDate"]!["attributes"]!!["label"] as? String 
+0

请详细说明,更多的努力。这样我们可以更好地帮助你 –

+0

con你显示你的数据? –

+5

你有没有在发帖前尝试搜索它,有关于这个问题的很多帖子,请查看http://stackoverflow.com/search?q=%5Bswift3%5D+Type+any+has+no+subscript+members –

回答

-1

我的解决办法没有下成员此

let dataArray = dict["im:releaseDate"] as! NSDictionary 

for item in dataArray { // loop through data items 
    if (item.key as! String == "attributes") { 
     descLabel.text = item.value as? String 
    } 
} 

我希望帮助

相关问题