# Accessing array value for Post request XML

**URL:** <https://community.postman.com/t/accessing-array-value-for-post-request-xml/1253>\
**Category:** Help Hub\
**Created:** [March 19, 2018, 5:23pm UTC](https://community.postman.com/t/accessing-array-value-for-post-request-xml/1253 "2018-03-19T17:23:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ywa](https://avatars.discourse-cdn.com/v4/letter/y/ed655f/32.png) [@ywa](https://community.postman.com/u/ywa)\
**Post date:** [March 19, 2018, 5:23pm UTC](https://community.postman.com/t/accessing-array-value-for-post-request-xml/1253/1 "2018-03-19T17:23:02Z")

</div>

I have to run several Post requests in Postman using XML format. I have to run same function for several ID’s. So i use variables. If i use variable id1, id2 the request looks like this:

{{id1}}  
{{id2}}  
If the id’s are saved in an array and the values can be found in id[0], id[2] etc. The request does not work like this:

{{id[0]}}  
What is the correct way to write the request using a variable stored in an array?

---

<div class="post-metadata">

**Author:** ![kunagpal](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kunagpal/32/9_2.png) [@kunagpal](https://community.postman.com/u/kunagpal)\
**Post date:** [July 5, 2018, 8:38pm UTC](https://community.postman.com/t/accessing-array-value-for-post-request-xml/1253/2 "2018-07-05T20:38:22Z")

</div>

@ywa Could you share more details about whether or not the IDs are static or dynamic?
