Skip to content

Instantly share code, notes, and snippets.

@sheafk
Created August 5, 2016 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheafk/55e887c1fb71558d692d840ad9017309 to your computer and use it in GitHub Desktop.
Save sheafk/55e887c1fb71558d692d840ad9017309 to your computer and use it in GitHub Desktop.
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