# Using array values for the next request

**URL:** <https://community.postman.com/t/using-array-values-for-the-next-request/31810>\
**Category:** Help Hub\
**Created:** [January 23, 2022, 7:58am UTC](https://community.postman.com/t/using-array-values-for-the-next-request/31810 "2022-01-23T07:58:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yigal](https://avatars.discourse-cdn.com/v4/letter/y/85e7bf/32.png) [@Yigal](https://community.postman.com/u/Yigal)\
**Post date:** [January 23, 2022, 7:58am UTC](https://community.postman.com/t/using-array-values-for-the-next-request/31810/1 "2022-01-23T07:58:56Z")

</div>

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 !
