title: Fetch image url to image tag in HTML using api calls in Javascript?
body: <p>I got json object, I want to fetch images from remote url to this <code>img</code> tag using api calls. The API link is <a href="https://api.github.com/emojis" rel="nofollow noreferrer">https://api.github.com/emojis</a></p>
  
  <pre><code>    &lt;div class="emoji"&gt;
            &lt;ul id="emojiz"&gt;&lt;/ul&gt;
            &lt;span style="display:inline;"&gt;&lt;img src=""&gt;&lt;/span&gt;
            &lt;span style="display:inline; "&gt;&lt;img src=""&gt;&lt;/span&gt;
            &lt;span style="display:inline;"&gt;&lt;img src=""&gt;&lt;/span&gt;
            &lt;span style="display:inline; "&gt;&lt;img src=""&gt;&lt;/span&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Javascript code is below:</p>
  
  <pre><code>fetch('https://api.github.com/emojis')
  .then(response =&gt; response.json())
  .then(data =&gt; {
   console.log(data) // Prints result from `response.json()` in getRequest
  })
  .catch(error =&gt; console.error(error))
  </code></pre>