Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An example of searching by Keyword
//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