Im trying to access an element in JSON With Hyphen in the property name
id("main").textContent = jsonData.res.main-result;
but that is causing an error
Im trying to access an element in JSON With Hyphen in the property name
id("main").textContent = jsonData.res.main-result;
but that is causing an error
const json = {
'property-name': 'something'
}
console.log(json['property-name']);
Use jsonData.res['main-result']