How to get to request parameters in Postman?

The pm.request.url.query.all() array holds all query params as objects.
To get the parameters as a dictionary you can use:

var query = {};
pm.request.url.query.all().forEach((param) => { query[param.key] = param.value});

Leave a Comment