Good day,
I am writing a collection-level script that will dynamically generate a signature based on all the query params. The issue is that if I use a dynamic variable in the request, it is not getting replaced with the current value. For example, the request is defined like so:
where companyId is saved in the login request. I then access via the pre-request script like so:
pm.request.url.query.all().forEach((param) => {
console.log(param);
});
and it comes back like so:
{key: “p_com_id”, value: “{{companyId}}”}
But I need that value to come back replaced with the current value. Any way to do this?
Note that I cannot hard-code or get via pm.environment because each call may use a slight variation on the key name. Perhaps I could check for {{xxx}} and do a lookup that way - any examples of this?
Thank you,
Tyler