ambiguous use of 'objectId' error

Hello World

Xcode is giving me an ambiguous use of ‘objectId’ error, any ideas would be appreciated

class Events : NSObject

{

var objectId: String?

}

let dataQuery = BackendlessDataQuery()

    var error: Fault?

    let bc = backendless.data.of(Events.ofClass()).find(dataQuery, fault: &error)

    if error == nil {

        print("Contacts have been found:")

        

        for obj in bc.data {

            

            let id = obj.objectId  (<------ Here




        }




        

    } else {

        print("Server reported an error: \(error)")

    }

Best Regards

Jason

Try changing the for declaration as this:

for obj in bc.data as! [Events]