how i can add multiple values in one variable in postman?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


how i can add multiple values in one variable in postman?



i need to run only one request with 4 sets of data, rest all requests i want to run one time so iteration is not an option for me. the request is get and i want to pass multiple values in one of the parameter of get request. want to run script for those many times like if 4 values in variable script should run 4 times. How i can add 4 values in one global parameter? secondly how to later use that parameter to run that many times?


pm.globals.set('my_var', JSON.stringify('["iphone", "ipad"]'))

for ( i=1; i<= 4; i++)
{

console.log (JSON.parse(pm.globals.get('my_var'))[0].value);
}



This is returning me [ as value as [ is present at that point but i want to make it read whole value which is iphone. Please guide









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived