(noob question), but I have some difficulties using the JSON data, I receive from the FAA NOTAM API and converting that via an id or class into html code.
(I have hidden the keys on purpose)
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function(e) {
var response = e.target.responseText;
console.log(response);
});
xhr.addEventListener('error', function(e) {
console.error('Request error with status', e.target.status);
});
xhr.open('GET', 'https://external-api.faa.gov/notamapi/v1/notams?icaoLocation=ELLX');
xhr.setRequestHeader('client_id','');
xhr.setRequestHeader('client_secret','');
xhr.send();
<a id="input"></a>