Use for each boucle with Json

Hi ,

hello ,

How do I configure a for loop ( see image ) so that the loop changes at each id.

In this case the data for each id ( nni , first name , last name … etc ) used in the process of the robot ( in the form of variable ) once the processsus finished we pass to the next id and so on .

Thanks for your help

exemple

Hi @frederic-f.bonnet

If possible provide the complete json data and i will try to provide the output as per your data.

->Pass the string input into the Deseralize Json avtivity.
->You need to use the for each and pass the output of the Deseralize activit as the input for the for each .

Please check the below thread for better understanding and you need to change the key names as per your requirement.

Regards

Deserialize The JSON with:
Deserialize JArray Activity - out: myJArray

For each Activity - item in myJArray.Values(Of JObject)

  • nested for each Activity - prp in item.Properties() | TypeArgument: JProperty
    • For Demo: log message: prp.Name
    • For Demo: log message: prp.Value.toString()

Hi @frederic-f.bonnet

Workflow:


xaml:
Sequence2.xaml (8.7 KB)

Output:
image

Regards

hi ,thanks for your help ,

vrdabberu , your file sequence2 seems corrupted , i cannot open

this an example of json

Hi @frederic-f.bonnet

Check the below workflow file:
BlankProcess25.zip (697.5 KB)

Regards

Looping over items and properties


Sample logs
grafik

DataType specific extraction Demo:
grafik

Also have a look at this:
grafik

1 Like

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