I could swear I've done this before but can't for the life of me figure out how. Anywho...
I have an API call in a server request that returns exchange rate data like this...
"data": {
"data": {
"AUD": 1.5954202845,
"BGN": 1.8374102141,
"BRL": 5.8846708234,
"CAD": 1.4395702387,
"CHF": 0.889800103,
"CNY": 7.2634507878,
"CZK": 23.5735438441,
"DKK": 7.0209012078,
"EUR": 0.9408001165,
"GBP": 0.7817701284,
"HKD": 7.7697814779,
"HRK": 6.6180606635,
"HUF": 375.3047294933,
"IDR": 16424.190094376,
"ILS": 3.6238005279,
"INR": 87.2032291999,
"ISK": 137.6289139839,
"JPY": 149.8041957748,
"KRW": 1451.6047592276,
"MXN": 20.5372327795,
"MYR": 4.4539506337,
"NOK": 11.0890822173,
"NZD": 1.766710251,
"PHP": 57.5633869219,
"PLN": 3.9116205264,
"RON": 4.6839307281,
"RUB": 89.6462648221,
"SEK": 10.4124618261,
"SGD": 1.3378301405,
"THB": 33.6367943783,
"TRY": 36.4333356746,
"USD": 1,
"ZAR": 18.4604632239
}
}
I can access a particular rate using something like {{api.data.data.AUD}} but I need to be able to use a variable for the actual currency code.
Any help would be most appreciated! Thanks.