Skip to content

Instantly share code, notes, and snippets.

@jwerle
Created September 2, 2014 12:39
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 jwerle/e0841c09d0d25dfd6eb7 to your computer and use it in GitHub Desktop.
Save jwerle/e0841c09d0d25dfd6eb7 to your computer and use it in GitHub Desktop.
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