Posts

Showing posts with the label postman-collection-runner

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

Image
Clash 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 ...