Created
December 22, 2014 17:29
-
-
Save devdays/c4e9e2e8c95664d1cde6 to your computer and use it in GitHub Desktop.
jQuery Example Grep with multiple tests
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
// demonstrate how Grep can have multiple criteria | |
var expensiveToys = $.grep(myData.products, function (element, index) { | |
return element.category == "Toy" && element.price > 9; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment