I am getting this error when trying to run the code below (I am using the script editor in Airtable for those familiar). The API output is an XML string that I am converting to an object with some code I found on Github.
let response = await fetch('https://myapiendpoint.com/parameters',
{
method: 'GET',
headers: {
'apikey': 'MY KEY'
},
})
let myResponse = parseXML(await response.text())
console.log(myResponse)
console.log(Object.keys(myResponse))
console.log(myResponse.Users.User.FirstName)
You can see that even though I am using the correct key, I am still getting an error when trying to call the FirstName key from the third console.log line.
Any assistance would be greatly appreciated