Created
September 2, 2014 12:39
-
-
Save jwerle/e0841c09d0d25dfd6eb7 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
files.items | |
.filter(function (file) { | |
// search parents array looking for atleast once | |
// parent that has the id you are looking for | |
return file.parents.some(function (parent) { | |
return PARENT_ID_YOU_CARE_ABOUT == parent.id | |
}); | |
}) | |
.forEach(function (file) { | |
// do stuff with each file after filtering here... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment