Obtaining a value from a JSON

Hi all

Using the deserialise JSON function, a for each and an assign, I’ve manged to get the information I want in to a string variable - this is the information it contains

image

Please can I ask, what code would I write so I am just left with the word ‘Africa’?

For a bit of context, I am practicing working with API’s and I have set myself the challenge using this https://api.football-data.org/v2/competitions to get the country or continent that football competitions are played in. I will go on to get information like the name of the competition, the start and end date etc hence I just need ‘Africa’ (or whatever country is presented as I loop through the data)

Thanks in advance,
Jordan

Hi @jordrowley,

Just go through this thread it will help you. As I can see it is JSON object and this thread belongs to JSON object only and they have sample xaml attached.

Best!!
Anmol

Can you check this @jordrowley

If you have the JSON as above , the below will solve your issue

image

1 Like

Hey @HareeshMR

This worked fine, thank you - I put in the variable that contains that information in to the deserialize Json box (e.g ‘jsonObjArea.Item(“area”).ToString’) which produces an output of jsonObjArea2 and then in to an assign I put your string jsonObjArea2.Item(“name”).ToString to get the country - thank you for the help :slight_smile:

Thank you; sorry for the late reply. I will take a good look through the page and try the demo

Thanks :slight_smile:
Jordan

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