In my app I have an array of custom Objects.The structure of each row looks like this when I append them:
self.listOfParticipants.append(ParticipantInfo(participantUser: "userID", participantName: "userName", participantIconName: partiImage!))
I know that to return the index from a simple array of Strings I could do something like array.indexOf("Jason")
and would return me the index where "Jason" is.
But what if in my case I want to know the index where the "xxxxx" userID is? I tried the following line, but Xcode doesn't like it:
var adminIndex = listOfParticipants.indexOf(ParticipantInfo.participantUser: "xxxxx")
Thanks!