I have two arrays:
var array = Array<Dictionary<String, Any>>()
var deletes = Array<Dictionary<String, Any>>()
I am appending deletes into array based off index:
for item in indexPaths {
deletes.append(self.array[item.item])
}
Else where in my code, I am now trying to get the index of self.array of the item in delete:
for item in deletes {
let i = self.array.index(of: item)!
self.array.remove(at: i)
}
However on I am getting this error on let i
Cannot invoke 'index' with an argument list of type '(of: [String : Any])'
What am I doing wrong? How do I get the index of array of dictionary?