addQueryParam
Add a query parameter to a URL string.
url(required): the base URLname(required): parameter namevalue(required): parameter value
bash
echo '{"baseUrl": "https://api.example.com/search", "term": "hello world"}' \
| utlx -e 'addQueryParam($input.baseUrl, "q", $input.term)'
# "https://api.example.com/search?q=hello+world"utlx
{
url: addQueryParam(addQueryParam($input.baseUrl, "page", "1"), "limit", "50")
}