Skip to main content
The rq.iterationData object provides access to data from CSV or JSON files when running collections with the Collection Runner. Each iteration of the collection run receives a different row (CSV) or object (JSON) from the data file, allowing you to parameterize your requests dynamically.
This feature works only when you run a collection with an attached data file, which is supported exclusively in the Desktop App. If you run a single request or a collection without a data file, rq.iterationData remains undefined.

Methods

rq.iterationData.get(key)

Retrieves the value for a specific key from the current iteration’s data. Parameters:
  • key (string): The name of the variable/column to retrieve
Returns: The value associated with the key, or undefined if the key doesn’t exist Example:

rq.iterationData.has(key)

Checks if a specific key exists in the current iteration’s data. Parameters:
  • key (string): The name of the variable/column to check
Returns: true if the key exists, false otherwise Example:

rq.iterationData.toObject()

Returns all data from the current iteration as a JavaScript object. Returns: An object containing all key-value pairs from the current iteration Example:

Use Cases

Conditional Logic Based on Data

Validating Response Against Expected Data

Data File Format Examples

CSV Format

Accessing in script: