class book{ var nameOfBook: String! } var englishBooks=[book(),book(),book()] var arr = englishBooks.filter { contains($0.nameOfBook, \"rt\") }
in case you want to delete an interval of object which has specific IDs (matchIDsToDelete) from an array of object (matches)
var matches = [Match] var matchIDsToDelete = [String] matches = matches.filter { !matchIDsToDelete.contains($0.matchID) }