Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of filtering by key word
//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