cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Http data

Hi, I extracted some exchange rate information from the following site(s): http://www.floatrates.com/daily/dkk.json 

http://www.floatrates.com/daily/dkk.xml

because I need the DKK exchange rates. 

I can easily get them imported into my flow via the http connector. 

Problem:

How can I get/extract the individual exchange rates such as DKK vs. USD, DKK vs. EUR, etc. that I would like to process in the next flow steps?

Would be happy if you could provide me with some tips/tricks/hints. 

Many thanks, 

Ludwig

 

1 ACCEPTED SOLUTION

Accepted Solutions

@lreinhard7  The only thing I can think of is to split up each object in your JSON then re-form it as an array. That way you can they use the apply to each on it and save yourself multiple actions.

 

See this post for more info on this https://powerusers.microsoft.com/t5/General-Flow-Discussion/JSON-object-to-array/m-p/140839#M14684

 

Sam

View solution in original post

5 REPLIES 5
SamPo
Power Participant
Power Participant

@lreinhard7 What does the data look like when you receive it?

Can you post a screenshot and an example of the data.

Good Morning,
Here are two screenprints of the data how I receive it. 
Aim:
I need a list of exchange rates like
line 1: DKKvsUSD date rate
line 2: DKKvsEUR date rate
line 3: DKKvsGBP date rate
etc.screen1screen1screen2screen2

Date extract

 

{
"usd": {
"code": "USD",
"alphaCode": "USD",
"numericCode": "840",
"name": "U.S. Dollar",
"rate": 0.15070555619311,
"date": "Tue, 9 Apr 2019 12:00:01 GMT",
"inverseRate": 6.6354554222184
},
"eur": {
"code": "EUR",
"alphaCode": "EUR",
"numericCode": "978",
"name": "Euro",
"rate": 0.13376624618831,
"date": "Tue, 9 Apr 2019 12:00:01 GMT",
"inverseRate": 7.4757274611133
},
"gbp": {
"code": "GBP",
"alphaCode": "GBP",
"numericCode": "826",
"name": "U.K. Pound Sterling",
"rate": 0.11524763058234,
"date": "Tue, 9 Apr 2019 12:00:01 GMT",
"inverseRate": 8.6769679771036
}

....

 

Best regards, 

 

Ludwig

 

 

 

@lreinhard7 You can use 'Parse JSON' on the body of your HTTP and then you can use any of the values from the result set from the dynamic content window.

 

2019-04-10_0832.png

Good Morning SamPo, 

I already tried the Parse Json but not the compose element. 

The issue that I see is that I need more than 100 compose elements; one for each rate. 

For example, one for the USD rate, one for the EUR rate, one for the GBP rate, etc. 

Making this setup is a pain. 

Is there any other way how to achieve that?

Best regards, 

Ludwig

@lreinhard7  The only thing I can think of is to split up each object in your JSON then re-form it as an array. That way you can they use the apply to each on it and save yourself multiple actions.

 

See this post for more info on this https://powerusers.microsoft.com/t5/General-Flow-Discussion/JSON-object-to-array/m-p/140839#M14684

 

Sam

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,623)