title: Cannot retrieve specific JSON data from API call
body: <p>I am trying to use the variable 'myResult' to return specific JSON data. I believe I may have written the 'myResult' variable wrong and I am not querying for the correct data. The path for <code>'[1].show.score'</code>is correct and I will add in screenshots of the JSON data I am trying to call.
  When I call for this data, I get returned to me this error:</p>
  <p>[![My error][2]][2]</p>
  <p>Here is the result of 'url'</p>
  <p>[![The returned JSON data from the variable 'url'][1]][1]</p>
  <p>Here is my code:</p>
  <pre><code>document.querySelector('.myButton').addEventListener('click', function(){
    var query = document.getElementById('main').value;
    var url = fetch(&quot;http://api.tvmaze.com/search/shows?q=&quot;+query)
    .then(response =&gt; response.json())
    .then(data =&gt; console.log(data));
    var myResult = url[1].show.score;
    console.log(myResult);
  })```
  
  
    [1]: https://i.stack.imgur.com/lTn8V.png
    [2]: https://i.stack.imgur.com/kS7gB.png
  </code></pre>