Json parsing not working

I’m trying to extract data from this Json file
STA_JSON_SAMPLE.json (2.7 KB)

I need to get items from an array for “previousResidentialAddress”, but keep getting this error:

image

I’ve watched a bunch of video and tutorials, but I can’t figure out what the problem is.

Here is my example:

ExtractingdatafromJSON.xaml (8.1 KB)

thank you!!

Check this it will help you How to extract the exact data from Json file

1 Like

@JCH

  1. Deserialize the entire JSON array into an object using Deserialize JSON. Let’s call this variable totalJson. It is type JObject.

  2. Use another Deserialize JSON to deserialize totalJson.Item("staApplication").ToString. Let’s call the new variable staApplicationObject.

  3. Use Deserialize JSON Array to deserialize staApplicationObject.Item("previousResidentialAddress").ToString. Store the resulting JArray in a variable, let’s call it previousAddressArray.

  4. You can then use a For Each to loop through each item in the JArray. Make sure to set the TypeArgument property to Newtonsoft.Json.Linq.JObject so the loop knows what it’s iterating over.

  5. Inside the loop you can use a final Deserialize JSON to deserialize each individual previous address and extract the data that you need.

4 Likes

Hi @JCH

First As i debug your xaml i see that you are not declaring this variable

Then follow what @DanielMitchell stractions .:smiley:

cheers :smiley:

Happy learning :smiley:

2 Likes

Thank you so much for that @DanielMitchell. I figured out how to get the data elements from the array and everything else as well. Exactly what I needed to get this project going.

And yes @pattyricarte I’m doing lots of learning!! :laughing:

2 Likes

yey thats great!

cheers :smiley:

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