Hi everybody,
I am trying to use the JSON data of the currencyconversion api and try to parse them and save to excel file.
Now, the problem is that I dont understand how to parse a sub JSON object.
The api url is : https://exchangeratesapi.io/
So the sample data would be:
{ “base”:“EUR”,
“date”:“2018-05-07”,
“rates”: {
“AUD”:1.5882,
“BGN”:1.9558,
“BRL”:4.2162,
“CAD”:1.5338,
“CHF”:1.1964,
“CNY”:7.5778,
“CZK”:25.518,
“DKK”:7.4486,
“GBP”:0.8801,
“HKD”:9.3428,
“HRK”:7.3985,
“HUF”:314.34,
“IDR”:16735.4,
“ILS”:4.3121,
“INR”:79.904,
“ISK”:121.8,
“JPY”:130.15,
“KRW”:1288.09,
“MXN”:23.0215,
“MYR”:4.6947,
“NOK”:9.619,
“NZD”:1.7013,
“PHP”:61.763,
“PLN”:4.2537,
“RON”:4.6563,
“RUB”:74.8299,
“SEK”:10.5383,
“SGD”:1.5917,
“THB”:37.944,
“TRY”:5.0827,
“USD”:1.1902,
“ZAR”:14.973
}
}
Now I am trying to loop over the rates sub JSON object and automatically add the key for example “CHF” to excel file and access the value also automatically without accessing it by using the exact string value of it.
How can I do this.