I have the below Jason body from a request. I am trying to make variable or capture the total information (In this case 1). This is the error that im getting. “directly is not defined”
-----------------------Script Used---------------------------------------
const response = pm.response.json();
const total = response.used-directly.map(entry => entry.total);
console.log(names);
-----------------------Script Used---------------------------------------
-----------------------JSON BODY---------------------------------------
{
“used-directly”: {
“total”: 1,
“objects”: [
{
“uid”: “a974688c-632d-428d-aa7f-1eee2e6b13db”,
“name”: “Sentinel SIEM POC - AzureARC”,
“type”: “group”,
“domain”: {
“uid”: “41e821a0-3720-11e3-aa6e-0800200c9fde”,
“name”: “SMC User”,
“domain-type”: “domain”
},
“icon”: “General/group”,
“color”: “black”
}
],
“threat-prevention-rules”: ,
“nat-rules”: ,
“access-control-rules”: ,
“https-rules”:
}
}
-----------------------JSON BODY---------------------------------------