Created
August 5, 2016 12:43
-
-
Save sheafk/916dfc1988a8a7c58867abf02fdeb930 to your computer and use it in GitHub Desktop.
Example of using the filter function
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
//Greater Than or Less Than | |
var rentPerMonth = [["rent" : 2200], ["rent" : 2350], ["rent" : 2300], ["rent" : 2490]] | |
var filteredRent = rentPerMonth.filter({ | |
$0["rent"] < 2000 | |
}) | |
print(filteredRent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment