Pass an array as a parameter

Number of APIs: 1

This is an answer to the following questions on the Qodex Community Forum:

  • [
  • [

While you can only store one value in a variable, if it is a string that is formatted like an array, it can be parsed and turned into a native JavaScript array. Look at the collection variables to see two different variable strings that will be converted into JavaScript arrays.

Check the Pre-request Script tab to see how you can:

  • Parse a variable to use as an array
  • Loop through an array and use the sendRequest method to send a request directly from the Pre-request tab.

Learn more about [sending requests from scripts] in the Qodex Learning Center

  1. Pass an array as a parameter POST https://postman-echo.com/post