I want to delete the strings from an array that do not contain the substring "originals".
I tried this and it didn't work, it just printed the whole array. I need like the equivalent of a for i loop from Java.
for (position, imageURL) in imageURLs.enumerated() {
if !imageURLs[position].contains("originals"){
imageURLs.remove(at: position)
}
}
print(imageURLs)
imageURLs = imageURLs.filter { $0.contains("originals") }.