'Node.js Cannot get some values from API like matview-failing giving ReferenceError

I am able to get the response from the API but a few values would throw Reference error.

it('checkValuesAPI', async () =>{    
    const response = await axiosBasicAuth({ 
      path:'some path',   //cannot add the path privacy reasons
      headers: {        
         accept: 'application/json',      
      },      
      method :'GET'  
   });    
   assert.equal(response.data.ib.uri,657362);  
   assert.equal(response.data.ib.matview-failing,0);  
  });
});

The above function gets the values from the API and uri works but the matview-failing throws

ReferenceError: failing is not defined 

The json looks like this

const res =response.data.ib;
console.log(res);

{
'matview-failing': 0,
'matview-refresh-ttcomplete': '2022-05-18T04:00:00.000',
appsrv: 'csrgnwalqut201',
'db-instance': 'CSQUT292',
servertime: '2022-05-17T11:16:08.000',
'matview-broken': 0,
'matview-success': 237,
uri: 657362,
'matview-refresh-oldest': '2022-05-17T04:00:00.000',
db: 'CSQUT29',
'db-created': '2022-05-01T07:42:55.000'
}

So over here I cannot get value of any starting with matview- Thank you for your help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source