I have a test which Posts some items
e.g.
POST:item : 1
POST:item : 2 and so on
and now in 1st Post request, I am trying to set a global variable in pre-request-script
postman.setGlobalVariable("item", 1);
and use this variable in the body e.g
"item": "{{item}}",
it work.
Now in 2nd Post request, I wanted to increment global variable, in pre-request-script
item=item+1;
postman.setGlobalVariable("item", item);
and in body same as above. but its give following error
There was an error in evaluating the Pre-request script: item is not defined