You can use Object.keys or Object.entries. For example if you want to loop through an object like const obj = {a: 1, b: 2, c: 3}, you can get the keys or key-value pairs like:
The reason you are seeing all that Promise stuff in the console output is because you are calling console.log before the Promise has resolved. You have to call it inside the getRatesFromDates function after jsonData has received a value from response.json. jsonData will be an ordinary JS object that you can iterate using any of the usual methods for iterating an object.
Seems like it looped through the array and display the table header n times depends on the array size… I tried doing something like rateArray[0].baseCurrencyName but it returns error. Is there a way to only display baseCurrencyName and targetCurrencyName one time?