how delete multiple generated ids one by one using delete endpoint
I am creating 5 records using Post end points, then after creating those ids I want to delete them one by one using delete end point just for clean up , so how can I achieve it?
So here, I cannot delete multiple IDs in a single request.
While creating the records, storing them in a property as object as below-
{"id1":"124","id2":"234","id3":"345" }
Tried it with groovy, where I am reading those IDs from the property using "Data Source" and then trying to use them for delete using loop, but problem is the loop is going infinitive and for delete always taking only 1st ID i.e "id1":"124".
It would be great if anyone can give me solution .
Hi scot1967 ,
If you are looking for a code here is the example
TempArray["Test"] = BuiltIn.CreateVariantArray(0, 5);
var i;
for(i = BuiltIn.VarArrayLowBound(TempArray["Test"] , 1); i <= BuiltIn.VarArrayHighBound(TempArray["Test"] , 1); i++)
{
Log.Message(TempArray["Test"] (i) );
}-Ashwin
Please give a Kudo and accept it as a solution if this works