ewan ewan - 1 year ago 160
JSON Question

NSFastEnumerationIteration.member Swift 3

I have some difficult to convert my Swift 2.2 app to Swift 3.0.
I have some errors and I don't find the solution yet. Currently, my worst problem is with

, I try to get records from JSON but with this error I can't. This is the screenshot of my code with the problem :

Swift 3.0 error with NSFastEnumerationInteration

Answer Source

In Swift 3 you need to specify the type of object,so specify the type of your data Array to [[String:Any]].

if let dataArr = data as? [[String: Any]] {
    for dd in dataArr {
        //your code for accessing dd.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download