Not able to extract JSON data

Hi Everyone,
i’m working on 1 JSON file, i want to extract some data from that Json file but when i’m trying to extract data, I’m unable to use specific fields. uipath is throwing me erros. I’m attaching my code below. Can anyone guide me.
I want to extract - Country, Webpage,name

JSON.zip (202.9 KB)

Hi,

Hope the following sample helps you.
In this case, it’s better to use Deserialize JSON Array as the following.

JSONv2.zip (149.4 KB)

Regards,

Thanks @Yoichi , It worked. If you don’t mind can you clarify me why it is not working for " DeserializeJson " activity.

Hi,

As top level entity of your data is json array, it’s easier to use Deserialize JSON Array. If we use Deserialize JSON, it’s necessary to set TypeArgument is JArray type. Or if we set object type at TypeArgument, we need to cast it to JArray type when use.

image

Regards,

Thanks @Yoichi for the clarification.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.