# How could we run a specific request with a specific data in JSON data file?

**URL:** <https://community.postman.com/t/how-could-we-run-a-specific-request-with-a-specific-data-in-json-data-file/10682>\
**Category:** Help Hub\
**Created:** [February 9, 2020, 9:50am UTC](https://community.postman.com/t/how-could-we-run-a-specific-request-with-a-specific-data-in-json-data-file/10682 "2020-02-09T09:50:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hung.dao](https://avatars.discourse-cdn.com/v4/letter/h/e47c2d/32.png) [@hung.dao](https://community.postman.com/u/hung.dao)\
**Post date:** [February 9, 2020, 9:50am UTC](https://community.postman.com/t/how-could-we-run-a-specific-request-with-a-specific-data-in-json-data-file/10682/1 "2020-02-09T09:50:32Z")

</div>

Hi all,  
I have a json data file, and list of request as “Get a single booking”, “Get a bulk booking”… inside a folder “Get a single booking”.

- The request “Get a single booking” has URL: {{baseURL}}/booking/{{bookingId}}
- In folder “Get a single booking”, I configure Pre-request script:  
let requestName = pm.iterationData.get(“requestName”);  
postman.setNextRequest(requestName)

The purpose is each iteration will call a specific request\_name, and assert the corresponding data  
Let say:

- iteration 1 sees the request name “Get a single booking” =\> call this request and ignore the others =\> assert the response data

- iteration 2 sees the request name “Get a bulk booking” =\> call this request and ignore the others =\> assert the response data

But actually, The iteration variable is always 0, and calls to “Get a single booking”. How could we achieve that.

```json
  {
    "requestName": "Get a single booking",
    "bookingId": 1,
    "expectResponse": {
      "firstname": "Sally",
      "lastname": "Jones",
      "totalprice": 992,
      "depositpaid": false,
      "bookingdates": {
        "checkin": "2015-04-17",
        "checkout": "2018-03-29"
      }
    }
  },
  {
    "requestName": "Get a bulk booking",
    "bookingId": 2,
    "expectResponse": {
      "firstname": "Mary",
      "lastname": "Jones",
      "totalprice": 890,
      "depositpaid": true,
      "bookingdates": {
        "checkin": "2015-08-21",
        "checkout": "2016-09-29"
      }
    }
  }

```
