title: Is it possible to return a JSON Object using fetch?
body: <p>I've been trying to use the fetch API to get a JSON Object since three days, I've searched on mostly all the threads I could find.
  So I have a function which is using fetch, I want this function to return a JSON Object, but when I try to print it, it's a Promise Object. I've found that fetch IS actually returning Promise objects. So if it's impossible for fetch to return a JSON Object, how can I get a JSON Object from a Promise Object ?
  The console.info in _ParseJSON print correctly the JSONObject that I want, but out of the fetch, it's impossible to reconstitute the JSON.</p>
  
  <pre><code>import React from 'react';
  
  export class JSONObject {
  constructor(_url) {
      this.URL = _url;
      this.importedJSON = null;
  
      this.state = {}; //Init getter setter
  }
  
  ParseCurrentUrl() {
      this.importedJSON = this._ParseJSON();
      console.info(this.importedJSON);
  }
  
  _ParseJSON() {
      return fetch(this.URL)
          .then(response =&gt; response.json())
          .then((responseJSON) =&gt; {
              const { statusCode, data } = responseJSON;
              console.info("_PARSE");
              console.info(responseJSON);
              return responseJSON;
          })
          .catch((e) =&gt; {
              console.error(e);
          })
  }
  
  set URL(_newUrl) { this.constructor.URL = _newUrl; }
  get URL() { return this.constructor.URL; }
  }
  </code></pre>