Retrieve the objects from json format

soo I’m trying to retrieve the data from a Json object from a API. im displaying the json below
[
{
“Message”: “Number of Post office(s) found:5”,
“Status”: “Success”,
“PostOffice”: [
{
“Name”: “Gandhinagaram (Vijayawada)”,
“Description”: null,
“BranchType”: “Sub Post Office”,
“DeliveryStatus”: “Delivery”,
“Circle”: “Andhra Pradesh”,
“District”: “Krishna”,
“Division”: “Vijayawada”,
“Region”: “Vijayawada”,
“State”: “Andhra Pradesh”,
“Country”: “India”,
“Pincode”: “520003”
},
{
“Name”: “Satyanarayanapuram (Vijayawada)”,
“Description”: null,
“BranchType”: “Sub Post Office”,
“DeliveryStatus”: “Delivery”,
“Circle”: “Andhra Pradesh”,
“District”: “Krishna”,
“Division”: “Vijayawada”,
“Region”: “Vijayawada”,
“State”: “Andhra Pradesh”,
“Country”: “India”,
“Pincode”: “520011”
},
{
“Name”: “Vijayawada”,
“Description”: null,
“BranchType”: “Head Post Office”,
“DeliveryStatus”: “Delivery”,
“Circle”: “Andhra Pradesh”,
“District”: “Krishna”,
“Division”: “Vijayawada”,
“Region”: “Vijayawada”,
“State”: “Andhra Pradesh”,
“Country”: “India”,
“Pincode”: “520001”
},
{
“Name”: “Vijayawada Bus Stand”,
“Description”: null,
“BranchType”: “Sub Post Office”,
“DeliveryStatus”: “Non-Delivery”,
“Circle”: “Andhra Pradesh”,
“District”: “Krishna”,
“Division”: “Vijayawada”,
“Region”: “Vijayawada”,
“State”: “Andhra Pradesh”,
“Country”: “India”,
“Pincode”: “520002”
}
]
}
]
after Deserialize JSON Array in UI path, I kept a for loop for accessing each object.

i tried for assigning a variable to store the value of pincode in json format.
varPINCODE=item(“PostOffice”)(“Pincode”).tostring (in for loop)

It displaying the error as:
Message Box: Accessed JArray values with invalid key value: “”. Int32 array index expected.
after this error I modified into varPINCODE=(“PostOffice”)(0)(“Pincode”).tostring
Then it is displaying the first array value only as I mentioned the index to 0.

HOW TO GET ALL THE VALUES IN JSON ARRAY
I’m uploading the file also check if needed
thanks in advance…
happy learning…Main.xaml (12.9 KB)

Hello @SK_2123!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Hello SK,
In this video I work with a complex JSON:

Thanks,
Cristian Negulescu