title: How do I list all elements from a JSON array in VSCode's Webview?
body: <p>I'm trying to read, parse and display the elements of a JSON for my extension, but somehow it's not getting displayed.<br>
  My code before the HTML part in <code>_getHtmlForWebview()</code>, where I declare the array is this:</p>
  <pre><code>const fs = require('fs');
  const configsList = fs.readFileSync('./configuration.json', 'utf8');
  </code></pre>
  <p>Everything works here, I tried <code>console.log(configList)</code> and the array is printed as it should. So no problems here.<br>
  Next I tried to iterate over the data array in the HTML like this (just parts):<br></p>
  <p>In the &lt;HTML&gt; part:</p>
  <pre><code>function displayConfigs() {
      var mainContainer = document.getElementById(&quot;target-id&quot;);
      data = ${configList}
      for (var i = 0; i &lt; data.length; i++) {
          var div = document.createElement(&quot;div&quot;);
          div.innerHTML = 'Config ID: ' + data[i].id + ', Config Name: ' + data[i].name;
          mainContainer.appendChild(div);
      }
  }
  </code></pre>
  <p>And executing it in the &lt;Script&gt; part:</p>
  <pre><code>&lt;span onclick=&quot;displayConfigs()&quot;&gt;&lt;button&gt; &lt;strong&gt;Display Configs&lt;/strong&gt; &lt;/button&gt;&lt;/span&gt;
  &lt;div id=&quot;target-id&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>But after pressing the button in my webview, nothing happens</p>