Why does .json() return a promise?
<p>I've been messing around with the <code>fetch()</code> api recently, and noticed something which was a bit quirky. </p>

<pre><code>let url = "http://jsonplaceholder.typicode.com/posts/6";

let iterator = fetch(url);

iterator
  .then(response =&gt; {
      return {
          data: response.json(),
          status: response.status
      }
  })
  .then(post =&gt; document.write(post.data));
;
</code></pre>

<p><code>post.data</code> returns a <code>Promise</code> object.
<a href="http://jsbin.com/wofulo/2/edit?js,output" rel="noreferrer">http://jsbin.com/wofulo/2/edit?js,output</a></p>

<p>However if it is written as:</p>

<pre><code>let url = "http://jsonplaceholder.typicode.com/posts/6";

let iterator = fetch(url);

iterator
  .then(response =&gt; response.json())
  .then(post =&gt; document.write(post.title));
;
</code></pre>

<p><code>post</code> here is a standard <code>Object</code> which you can access the title attribute.
<a href="http://jsbin.com/wofulo/edit?js,output" rel="noreferrer">http://jsbin.com/wofulo/edit?js,output</a></p>

<p>So my question is: why does <code>response.json</code> return a promise in an object literal, but return the value if just returned?</p>