title: How to get data and response status from API using node-fetch?
body: <p>As per the node-fetch documentation <a href="https://www.npmjs.com/package/node-fetch" rel="noreferrer">node-fetch</a></p>
  
  <p>we can get the response status like this</p>
  
  <pre><code>fetch('https://github.com/')
      .then(res =&gt; {
          console.log(res.status);
      });
  </code></pre>
  
  <p>and for getting the data</p>
  
  <pre><code>fetch('https://api.github.com/users/github')
      .then(res =&gt; res.json())
      .then(jsonData =&gt; console.log(jsonData));
  </code></pre>
  
  <p>I have a scenario where I need to return the JSON data and the status from the response. I tried to use like this</p>
  
  <pre><code>     fetch('https://api.github.com/users/github')
              .then(res =&gt; res.json())
              .then(jsonData =&gt; {
               console.log(jsonData);
               console.log(jsonData.status);
        });
  </code></pre>
  
  <p>but the </p>
  
  <blockquote>
    <p>console.log(jsonData.status)</p>
  </blockquote>
  
  <p>won't return the status. How I can get status and output data</p>