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 =, fault: &error)

    if error == nil {

        print("Contacts have been found:")


        for obj in {


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



    } else {

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


Best Regards


Try changing the for declaration as this:

for obj in as! [Events]