having problems with quotes in postman. I've set the request body as json: {{request_body}}
This is the code in the pre-request:
var body = {"data":{"Version":"{{foo}}"}}
pm.environment.set("foo",pm.globals.get("x"));
var body_str = JSON.stringify(body);
pm.environment.set('request_body', body_str);
The request body is:
{"data":{"Version":"125"}}
But I want it to be without quotes:
{"data":{"Version":125}}
If I try to delete the quotes from the pre-request it gives me error:
There was an error in evaluating the Pre-request Script: SyntaxError: Unexpected token {