title: Using Fetch API to Access JSON
body: <p>I am trying to use fetch api to bring back some data, however am unable to map it to the console once I have retrieved it.  </p>
  
  <pre><code>fetch('http://jsonplaceholder.typicode.com/users', { 
    method: 'GET'
  }).then(function(response) {
    console.log(response)
    response.forEach(i =&gt; console.log(i.name));
  }).catch(function(err) {
    console.log(`Error: ${err}` )
  });
  </code></pre>
  
  <p>The error i get is </p>
  
  <blockquote>
    <p>response.map is not a function </p>
  </blockquote>
  
  <p>so I tried to parse the response,(ie var data=JSON.parse) which did not work, with the error</p>
  
  <pre><code>SyntaxError: Unexpected token o in JSON at position 1"
  </code></pre>
  
  <p>Interestingly, when doing the same thing with a XMLHttp request, I was required to parse it, so I would also be interested to know why the difference between these two methods of retrieving the data.</p>
  
  <p>If anyone could point me in the right direction, I would be really grateful.  </p>