Created
January 4, 2017 08:27
-
-
Save elct9620/bbd0313c3a92e50c3b4151182cf5ba14 to your computer and use it in GitHub Desktop.
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
/* | |
doc.Items.map(function(id) { | |
return Check. | |
findById(id.toString()) | |
.then(function(doc){ | |
doc = doc.toObject(); | |
return doc; | |
}) | |
}) | |
*/ | |
var results = []; | |
Pormise.all( doc.Items.map( (id) => { Check.findById( id.toString()) }) ) | |
.then( (values) => { | |
// Values | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment