Skip to content

Instantly share code, notes, and snippets.

@samirbr
Last active August 29, 2015 14:23
Show Gist options
  • Save samirbr/a8fba889a8900bda17e7 to your computer and use it in GitHub Desktop.
Save samirbr/a8fba889a8900bda17e7 to your computer and use it in GitHub Desktop.
var tmp = [];
harvests.filter(function(harvest) {
var question;
// use Array.prototype.filter
question = questions.filter(function (question) {
// supondo harvest.question ==> id da questao
// do contrario use harvest.question.id
return harvest.question == question.id;
}).pop();
tmp.push({
uuid: harvest.uuid,
date: harvest.date,
device: harvest.device,
question: question.name;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment