class book{ var nameOfBook: String! } var englishBooks=[book(),book(),book()] var arr = englishBooks.filter { contains($0.nameOfBook, \"rt\") }
SWIFT 4.0
In order to filter objects and get resultant array you can use this
self.resultArray = self.upcomingAuctions.filter { $0.auctionStatus == "waiting" }