Using array values for the next request

Hi,
I have an array of objects returned from the response, I would like to send a post request of all the id’s ( each call with a different id, in the example below 9,10,11). how can I achieve it? I tried setting all the entities in an array as an environment variable, but unable to loop over the array in the next request as the array is undefined

the response :
“resources”: [
{
“entity”: {
“id”: 9,
“name”: "some name,
“state”: “some state”,
},
“entity”: {
“id”: 10,
“name”: "some name,
“state”: “some state”,
},
“entity”: {
“id”: 11,
“name”: "some name,
“state”: “some state”,
}
}

The next POST request body :
[
{
“enityid”: {{entityid}},
“name”: “Some name”,
}
]

Thanks !

1 Like