Skip to content
Advertisement

Conversion app to display the date and result

I have created a currency conversion app as users need to input the currency from, to and the amount required.

JavaScript

I have successfully retrieved the data from the API, when I click the button the result label was shown all the data below rather than the date and result of the currency’s conversion. How could I display the date and result in my result label?

The retrieved data from the API:

JavaScript

Advertisement

Answer

Use result = response.json() to get the JSON data from the response as a python dictionary. You can then use this dictionary to get the data you want.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement