I have an API that I am using however to get it to display I'm using:
`<div>${JSON.stringify(response)}</div> `
to get the the API endpoint to display and this works fine. However this results in an output like
{xxx:more text here}
The thing is I only want the more text here to be displayed so I use response.xxx and this works however how do I dynamically change the xxx in java script. So with a button click or some such action I can change the xxx so on the button click response.xxx can become response.yyy.
Any help will be greatly appreciated.