Hello, in my response template, I would like the v...
# help
k
Hello, in my response template, I would like the value to be parsed as a number, not a string, is it possible? My expression correctly populates the value, but it is parsed as string, and I need it to be a number. I tried something like this {{ numberFormat request.query.code 'integer' }} but it did not work
l
Hi Kelly, would it be possible to share your stub file and a request you are using so we can see what you are trying to achieve ?
k
My response should be like this
{ "code": "{{request.query.code}}", }
where the value of code, is passed on the query parameter code
l
Is the problem you are seeing that the
{{request.query.code}}
requires the quotes around it ?
In your response template, would something like this work:
Copy code
"body": "{\"code\": {{request.query.code}} }",