Clever trick with JSON data required (2 replies)
Unfortunately, there's no 'trick', you have to do it the hard way.
And whilst it looks as if each rate should map to a record....each rate is actually a field...not an object. An equivalent scenario is a row from a SQL query transforming the columns to individual rows.
Darn. Thanks for the input. I'll have to effectively convert each column to a row as you suggest. Horrible!
Hi. I wonder if anyone can suggest a time saving for getting some JSON currency rate data into shape. It comes as follows.
{
"timestamp": 1602633598,
"base": "GBP",
"rates": {
"AED": 4.750917,
"AFN": 99.515864,
"ALL": 136.156621,
"AMD": 622.922426,
"ANG": 2.321936,
"AOA": 833.117737,
"ARS": 100.051862,
As far as I can see the currencies are individual fields under the "rates" transaction, with each having a value. Therefore, to get rates for 200 currencies would mean defining each currency as a field name and ending up with one record for all rates.
The desirable outcome is to have the currency and rate as two fields under the rates transaction. That way we would have one record per currency and rate. Is that easily possible?