Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of using the filter function
//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