Thursday 23 April 2020

How to get all properties out of a request response object?

Why does JSON.stringify(response) not return all properties of the object?I tried this: https://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify/26199752#26199752onsole.log(JSON.stringify(response, Object.getOwnPropertyNames(response.timings), 4)) And I get even fewer properties than if I just run:console.log(JSON.stringify(response, null, 4)) What gives?How can I spit out every single property that response has to offer?

Submitted April 24, 2020 at 02:47AM by grumpyThrifter

No comments:

Post a Comment