Error : Invoke Method: Can not add property id to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object

I am running a loop( 5 times) to generate the Json to execute using Http Request. first time loop run fine. next time it shows the error ( Invoke Method: Can not add property id to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.)

id is collection is parameter.
image

Any suggestion to resolve this issue?

Hi [Anurag Pradhan,

You are creating this with same id, so its giving error
Make it change

Thanks,
Rounak

Hello @Rounak_Kumar1

Thanks you for Quick response. I am generate following JSON using Invoke Method,
Above screenshot is 1 invoke method.

Json to insert data in http request.

{
“fields”: {
“project”: {
“id”: “13100”
},
“issuetype”: {
“id”: “10102”
},
“summary”: “Service Approximate Customers Impacted - DOT/WIDE”,
“description”: “What’s the issue”,
“customfield_11406”: {
“value”: “Email”
}
}
}


id is the project id , which is same in all 5 loop condition

What should I do to resolve this…

  1. Store the id in string variable then pass it or what?

Please help , my Job is reading is the email from outlook and inserting in ticketing system using invoke mehod i am generating above json and finally pass it to Http Request so it create the ticket in system.

First time it runs fine because all the invoke methods are new jobject, in next loop ( 2nd time) error comes.

Please suggest me.

Thanks,

Anurag

@Rounak_Kumar1 Any suggestion, let me know if you like to see the solution file ? I can share with you ! Thanks in advance.