Created
August 5, 2016 13:01
-
-
Save sheafk/55e887c1fb71558d692d840ad9017309 to your computer and use it in GitHub Desktop.
Example of filtering by key word
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
//Select nonchanging values like neighbordhoods - Good for buttons | |
let neighborhoods: NSArray = ["Crown Heights", "Clinton Hill", "Sunset Park"] | |
let fiteredNeighborhoods = (neighborhoods as! Array).filter { $0 == "Sunset Park" } | |
print(fiteredNeighborhoods) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment