title: JavaScript - How to get a specific value from a JSON object
body: <p>I am trying to get the first id value in results array from that object I got from an API:</p>
  
  <pre><code>{
      "page" : 1,
      "results" : [{
              "adult" : false,
              "backdrop_path" : "/fLL6WfUXvdQee1fD4xuzNnWfVBk.jpg",
              "genre_ids" : [27, 9648, 80],
              "id" : 176,
              "original_language" : "en",
              "original_title" : "Saw",
              "overview" : "Obsessed with teaching his victims the value of life, a deranged, sadistic serial killer abducts the morally wayward. Once captured, they must face impossible choices in a horrific game of survival. The victims must fight to win their lives back, or die trying...",
              "release_date" : "2004-01-19",
              "poster_path" : "/dHYvIgsax8ZFgkz1OslE4V6Pnf5.jpg",
              "popularity" : 2.897462,
              "title" : "Saw",
              "video" : false,
              "vote_average" : 7.1,
              "vote_count" : 657
          }, {
              "adult" : false,
              "backdrop_path" : "/yKATxJtGY67cXdOmlbWwW6EgPqn.jpg",
              "genre_ids" : [27, 53, 80],
              "id" : 663,
              "original_language" : "en",
              "original_title" : "Saw IV",
              "overview" : "Jigsaw and his apprentice Amanda are dead. Now, upon the news of Detective Kerry's murder, two seasoned FBI profilers, Agent Strahm and Agent Perez, arrive in the terrified community to assist the veteran Detective Hoffman in sifting through Jigsaw's latest grisly remains and piecing together the puzzle. However, when SWAT Commander Rigg is abducted and thrust into a game, the last officer untouched by Jigsaw has but ninety minutes to overcome a series of demented traps and save an old friend...or face the deadly consequences.",
              "release_date" : "2007-10-25",
              "poster_path" : "/veApHw5ARGHWf3ptKf30rOGFY9n.jpg",
              "popularity" : 2.449196,
              "title" : "Saw IV",
              "video" : false,
              "vote_average" : 5.8,
              "vote_count" : 257
          }
      ]
  }
  </code></pre>
  
  <p>Lets say my json object called json, What i tried so far is: </p>
  
  <pre><code>console.log(json.results[0].id);
  </code></pre>
  
  <p>and I got the following error:
  TypeError: Cannot read property '0' of undefined.</p>
  
  <p>I can't figure out what seems to be the problem, Is there other way to get the first id value in JavaScript?</p>