Skip to content

Instantly share code, notes, and snippets.

@jimmyjacobson
Created December 13, 2013 02:27
Show Gist options
  • Save jimmyjacobson/7938996 to your computer and use it in GitHub Desktop.
Save jimmyjacobson/7938996 to your computer and use it in GitHub Desktop.
var url = 'https://api.themoviedb.org/3/movie/';
imdb_id = 'tt0102685';
key = '?api_key=9a2c8fe3fd95dcd12c59204ad2899b9e';
append = '&append_to_response=credits';
$.ajax({
type: 'GET',
url: url + imdb_id + key + append,
dataType: 'jsonp',
success: function(data) {
data.credits.crew.forEach(function(person) {
if (person.job == 'Director') {
//do something
console.log(person);
}
});
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment