Iterating through a JArray in Parallel gives errors

When trying to perform a sequential operation in JArray using For Each activitiy block my process runs fine as shown below:
Whereas when I try to implement the same process using a parallel for each block, it shows compiler error as shown below:

Not sure why it won’t work with parallel forEach method?


Which type do you set in TypeArgument? Probably we need to set JToken (Newtonsoft.Json.Linq.JToken) in it.



I have set it to JObject in both the loops. For normal for each it’s running but for parallel for each it shows the error as I showed above.

Though setting it as JToken solved my problem but I am not sure why it has to be two differed arguments in parallel and generic for each loop. And thanks a lot for the help :slight_smile:

1 Like

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