Seeking guidance on how to extract specific data using JavaScript fetch. Currently working with the following API: . I am struggling to select just one currency, as my forEach loop displays all currencies but I want to display only one. To show all currencies, I have been using:
${data.rates[rate].name}
${data.rates[rate].rate}
In an attempt to display just one currency, I have tried multiple approaches, but this one seems most logical:
${data.rates[rate].name == dkk}
${data.rates[rate].rate}
However, this does not work. Does anyone know how to specify and display only a single set of data?