Error in getting jason while using http request in for each row

Hi,

I am creating file which contains Jira issue keys.
In my workflow i am opening this above file which contains jira issue keys and for each issue key i am trying to get jason because i want some values from that jason.
I am using invoke code activity to create jason and passing that object in http request and passing my variable “key” in invoke method which contains issue key.
By doing this i am able to get jason for first value (issue key ) which is in file but for second value i am getting error in invoke method like “Invoke Method: Can not add property jql to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.”

Kindly find below all screenshots .









@Cristian_Negulescu @deepak.rai6 @AndersJensen

First please Write JSON, not jason.
Second, you have a video here on how to execute JQL:

Third, the issue is that you do all the stuff in for each without initializing your variable.
in IF the first activity should be assign jsObject = New JObject()

Yes i have initialized my object as new jobject() .please find last screenshot.
i am passing variable in invoke method in value and even i am getting jason for first value but for second iteration it is giving error.
i have seen your video logic is same

Yes i put assign as start in for each and it solved my issue thanks.

1 Like

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