title: How to set an <h1> value from an API response?
body: <p>I have been trying to set a page title based on an API response. My HTML is:</p>
  <pre><code>&lt;h1 id='league_name'&gt;&lt;/h1&gt;
  </code></pre>
  <p>My Javascript is:</p>
  <pre><code>&lt;script&gt;
        fetch('https://api.example.com')
        .then(response =&gt; response.json())
        .then(json =&gt; {
          var name = JSON.stringify(json)
          document.getElementById('league_name').innerHTML = name;
        });
        &lt;/script&gt;
  </code></pre>
  <p>But it stays blank. The API response is just a single string</p>