title: Get object based on matching key value in nested array
body: <p>I have a movie feed where I'm trying to retrieve the "name" value of an object that has a specific key value. Here's the response:</p>
  
  <pre><code>{
      genres: [
          {
              id: 18,
              name: "Drama"
          },
      ],
      homepage: "http://www.therewillbeblood.com/",
      id: 7345,
      imdb_id: "tt0469494",
      release_date: "2007-12-26",
      crew: [
          {
              id: 4762,
              name: "Paul Thomas Anderson",
              department: "Writing",
              job: "Screenplay",
              profile_path: "/6lDE5N6lQUvAbKBRazn2Q0mRk44.jpg"
          },
          {
              id: 52563,
              name: "Upton Sinclair",
              department: "Writing",
              job: "Novel",
              profile_path: null
          },
          {
              id: 2950,
              name: "Robert Elswit",
              department: "Camera",
              job: "Director of Photography",
              profile_path: null
          },
          {
              id: 1809,
              name: "Dylan Tichenor",
              department: "Editing",
              job: "Editor",
              profile_path: null
          },
          {
              id: 4762,
              name: "Paul Thomas Anderson",
              department: "Directing",
              job: "Director",
              profile_path: "/6lDE5N6lQUvAbKBRazn2Q0mRk44.jpg"
          },
          {
              id: 4772,
              name: "Cassandra Kulukundis",
              department: "Production",
              job: "Casting",
              profile_path: null
          }
      ]
  }
  </code></pre>
  
  <p>So I'm trying to get the object with the "job" key value of "Director" which would be Paul Thomas Anderson.</p>
  
  <p>And here's my javascript where I'm setting the year variable based on the value of release_date. Just trying to figure out how I can set a director variable:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  var url = 'http://api.themoviedb.org/3/movie/';
  
  imdb_id = 'tt0102685';
  key = '?api_key=XXXXXXXXXXXX';
  append = '&amp;append_to_response=credits';
  $.ajax({
      type: 'GET',
      url: url + imdb_id + key + append,
      dataType: 'jsonp',
      success: function(data) {
        var $year = data.release_date.substring(0, 4);
        $('#year').html($year);
      },
  });
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated! Spent almost two days trying to figure it out to no avail.</p>