Q:

Google Chrome extension displaying json information in html

In this javascript file, I want to get the json information from a json file (config.json) that is declared in the content scripts of manifest.json. I'm sending that json file to the HTML file under the id "help", and upon click of the button the currently written html should change. Any ideas as to why this isn't working? Thank you!
    document.addEventListener('DOMContentLoaded', function () {
        document.querySelector('button').addEventListener('click', main);  

});

function main() {
    var xhr = new HMLHttpRequest();
    xhr.open("GET", chrome.extension.URL("config.json"), true);
    xhr.onreadystatechange = function() {
    if (xhr.readyState == 4) {
      document.getElementById("help").innerHTML = 
          JSON.parse(xhr.responseText);
    }
    }
    xhr.send();  
}

A:

there is typo in your code and you have not declared config.json as web accessible resource
  var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.status == 200 && xmlhttp.readyState == 4) {
            console.log(xmlhttp.responseText)
            document.getElementById("help").innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET", chrome.extension.getURL("config.json"), true);
    xmlhttp.send();

And in manifest add
 "web_accessible_resources": ["config.json"]

