0

I am familiar with the syntax to retrieve a single value from a data file in single iteration (shown below), but is there a quick way to retrieve all iteration data within a single iteration as an object? Or do I need to do this the long way by retrieving each value from the data file individually and adding it to an object?

Example of retrieving a single value:

var my_data = pm.iteradtionData.get("variable_name");

I've Attempted The Following, But These Do Not Work:

var my_data = pm.iteradtionData.JSON();

and

var my_data = pm.iteradtionData.get();

Googling this hasn't seemed to return anything useful

Michael M.
  • 10,486
  • 9
  • 18
  • 34

1 Answers1

1
var my_data = pm.iterationData.toObject();

Source: Postman JavaScript reference

Michael M.
  • 10,486
  • 9
  • 18
  • 34