How to parse JSON object and sub JSON object of currency API


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 :

So the sample data would be:

{ “base”:“EUR”,
“rates”: {

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.



Quick workaround which will help you extracting the rates.

  • Do a first “Deserialize Json” on the given string and set the TypeArgument as Jobject - Assign value to your variable
  • Do a second “Deserialize Json”. "[" & jObjVar("rates").ToString & "]". the “[]” are required if you want to deserialize as a datatable (with TypeArgument and output to Datatable) to write directly to excel after, As it will requires you a Jarray.

The will give the following horizontal output (as it is the case for datatables)


If you want to deserialize it as dictionary<String,Decimal> and being able to access it via the key, you will have to remove the “[]” from the previous expression (it requires and Jobject)



Ok, I am gonna try this out now.


Would it be possible to give a bit more explanation?

I will include my code example for now, but I do not completely understand your explanation.

I dont completely understand how to write directly to datatable and then to excel with your workaround.

The name is wrong because its included with another project, my apologies. It is about currencies this file.
weatheroverview.xaml (11.6 KB)



Suppose if you want to get “BRL” currency . You can try j.(“rates”)(“BRL”)

can you go through the below link



Yeah thx, I already saw this link. The meaning of what I wanna do is to avoid to use “BRL” or “EUR”. I just wanna save all the currencies with their value in an excel sheet and also loop over them to make comparisons.

If I do have to use every time the name of all the keys that are always different then I have a lot of extra code which is not good practice.



A made two changes to make what you submited work:

  • Change Type argument and output of the second deserialize json to datatable


  • Providing filepath is not required in your case to get the ouput of the httprequest

Let me know if everything works fine on your side.

Edit: attachment is not having AddHeader on the writerange, probably you will what to set it checked
Main.xaml (9.4 KB)


hey, it works now yes.

So, now I also just have a datatable that i could loop over with a “foreach row” if I am right to make customizations if I want? right? or am i seeing this wrong?


Now you have an excel file (or a Datatable) with one row and a header.

The simplest way to loop trough each currency values will be

For each value As Double (you will need to set TypeArgument) in dtCurrencies.Rows(0).ItemArray

If you want to loop both for the currency name and its value, then it is more appropriate to use a dictionary than a datatable to deserialiaze as a explain on my previous post.
It will requires you to remove the “[]” and set your TypeArgument on the second deserialize json to Dictionary<String,Decimal>.

Then loop using a for normal for each and check/writeline item.key and item.value.




I have made the video ,

Check once.


Hello Karthik,

can you please help me retrieve the values from below json array:

{“passwords”: [
“oldPassword”: “demo2”,
“newPassword”: “demo1”,
“dialogID”: “123456”,
“username”: “ckuhroeb”
“oldPassword”: “demo2”,
“newPassword”: “demo1”,
“dialogID”: “123456”,
“username”: “ckuhroeb”
“oldPassword”: “demo2”,
“newPassword”: “demo1”,
“dialogID”: “123456”,
“username”: “ckuhroeb”
“oldPassword”: “demo2”,
“newPassword”: “demo1”,
“dialogID”: “123456”,
“username”: “ckuhroeb”
“oldPassword”: “demo”,
“newPassword”: “demo1”,
“dialogID”: “123456”,
“username”: “ckuhroeb”
“oldPassword”: “demo12”,
“newPassword”: “demo1”,
“dialogID”: “123456”,
“username”: “ckuhroeb”


Hi Rakesh,

Please follow below tutorial,

if you are not able to understand, please mention in comments section so that I can explain you clearly.

please do subscribe to the channel for more learning.


Thanks Karthik.

I would appreciate if you can send me a workflow as I am not able to loop through the activity as there is a Json object followed by Json array.


similar example implementation.DesrializedJson.xaml (6.8 KB)
Main.xaml (10.9 KB)