Created
December 22, 2014 17:35
-
-
Save devdays/ce2146b5a8f22b00a2f9 to your computer and use it in GitHub Desktop.
jQuery Map Example
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
var groceryIndices = $.map(myData.products, function (val, i) { | |
return val.category == "Grocery" ? val.myProductIndex = i : null; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment