Skip to content

Instantly share code, notes, and snippets.

/Map

Created October 20, 2016 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c6c036caa707dac10f20bb12684eede3 to your computer and use it in GitHub Desktop.
Save anonymous/c6c036caa707dac10f20bb12684eede3 to your computer and use it in GitHub Desktop.
function Map() {
var nameList = ["Male", "Married"]
var items = []
this.items.forEach(function(val) {
if (nameList.indexOf(val.name) > -1) {
items.push(val)
}
})
emit(this.fanId, {count: 1, item: items});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment