Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jQuery Map Example
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