Skip to Main Content

JSON_TABLE - how to extract columns when the first key value dynamically changes

OracleDaveSJun 11 2019 — edited Jun 20 2019

Hi

I have the json output data below. As you can see the first value/key returned is the lowercase currency code, followed by the nested values for that currency code. How can I use the JSON_TABLE function to return relational data in the form currency, code, rate, date?

Tks

{

eur: {

code: "EUR",

rate: 0.88628275220025,

date: "Tue, 11 Jun 2019 12:00:01 GMT"

},

gbp: {

code: "GBP",

rate: 0.786891038587,

date: "Tue, 11 Jun 2019 12:00:01 GMT"

},

chf: {

code: "CHF",

rate: 0.99284202217432,

date: "Tue, 11 Jun 2019 12:00:01 GMT"

}

}

Comments
Post Details
Added on Jun 11 2019
3 comments
2,503 views