I have a JSON,
"http": {
"method": "POST",
"headers": [{
"content-type": "application/json"
}, {
"Authorization": "KKYZASSHUYTRJ"
}],
"url": "http://localhost:8888/download/context"
}
In this JSON, I need to access the headers and loop through the array. The keys of "headers" are dynamic. I need to access the keys as well as values. I need both keys and values to make a HTTP call. How can I do that in Typescript/Javascript
In all the Articles in Stackoverflow, I can able to see how to get the values using keys. Here I am asking how to retrieve keys as well as values.
I know that there is Object.getkeys() and Object.getValues() since these methods are not working in Safari, I am not choosing it.