Created
August 5, 2016 13:07
-
-
Save sheafk/e303c8cf72bcc9d0b8e8cc91cf2c88bf to your computer and use it in GitHub Desktop.
An example of searching by Keyword
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Search by Keyword | |
let savedApartments = [ | |
"apt1" : "The unit comes with stainless steel appliances, a full-sized refrigerator, plenty of storage, a gas oven, a gas range, and a dishwasher.The bedroom has hardwood floors and a window that opens.", "apt2" : "you will love it", "apt3" : "So many great amenities"] | |
for (name, description) in savedApartments { | |
if description.containsString("a window that opens") { | |
print(name) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment