Created
June 3, 2017 10:56
-
-
Save Czajnikowski/cc641a6f9f0f1383f0984a1df28199e4 to your computer and use it in GitHub Desktop.
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
let contacts: [Contact] = … | |
let results = contacts.filter { contact in | |
contact.addresses.filter { address in | |
address.city == searchQuery | |
}.count > 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment