i have an array of BackendlessUser and i want to remove the current user from that array how can i do this ??
i simply tried this :
myUserArray.removeObject(currentUser) // it didn’t worked i found out that value of current user is different all the time
here’s the printed value of my currentUser :
myUser : <BackendlessUser: 0x15dea9180>
my array : [<BackendlessUser: 0x15f188570>, <BackendlessUser: 0x15f18adc0>, <BackendlessUser: 0x15f179de0>, <BackendlessUser: 0x15f1827f0>]
and this value is not static it changes every time i try to retrieve my currentUser
so now how can i remove my currentuser ??
should i use objectId of users for identifying them ?? if yes then how can i did this ??
i tried this :
for vt in votesArray[row] as [BackendlessUser]{
print(vt.objectId)
userIds.append(vt.objectId) // here i get object id’s of my all users from that array
}
userIds.removeObject(currentUser.objectId) and here i removed my current user from this array
userIds contains objectID of backendlessUsers
now how can i get those backendlessUsers using their objectIds ???
SOLVED IT. JUST NEEDED A SIMPLE LOGIC