title: Convert $.each to plain JavaScript?
body: <p>I have been converting my whole website from jQuery to plain JavaScript and I am about 98% done.</p>
  <p>The thing is that I am stuck on a seemingly easy function which I am unable to solve.</p>
  <p>This is before</p>
  <pre><code>function searchAPI() {
      $.getJSON(&quot;get.php?q=&quot; + searchbar_input, function(data) {
          $.each(data, function(index, value) {
              $.each(value[&quot;item&quot;], function(index_item, value_item) {
                  $(&quot;#itemlist&quot;).append('&lt;li class=&quot;items&quot;&gt; ... &lt;/li&gt;');
              });
          });
      });
  }
  </code></pre>
  <p>and this is after</p>
  <pre><code>function searchAPI() {
      fetch(&quot;get.php?q=&quot; + searchbarValue)
          .then(response =&gt; response.json())
          .then(data =&gt; {
              $.each(data, function (index, value) {
                  $.each(value[&quot;item&quot;], function (index_item, value_item) {
                      itemlist.innerHTML += '&lt;li class=&quot;items&quot;&gt; ... &lt;/li&gt;';
                  });
              });
          });
  }
  </code></pre>
  <p>what should I use to replace $.each ? I cannot find an answer to a similar problem online ...</p>
  <p>Thank you so much</p>