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
Lee Turner
10/18/2023, 4:48 PM
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
Kelly Goedert
10/18/2023, 5:07 PM
My response should be like this
{
"code": "{{request.query.code}}",
}
where the value of code, is passed on the query parameter code
l
Lee Turner
10/18/2023, 5:09 PM
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: