getUrlQueryParameter
Modified on Wed, 02 Aug 2023
Description
Return the first value associated with the given search parameter in a URL.
Syntax
getUrlQueryParameter(url, parameter)
Parameters
Input Parameter | Type | Description |
---|---|---|
url | string | URL string |
parameter | string | Query parameter |
Return value
Type |
---|
string | null |
Sample
Example | Result | Description |
---|---|---|
getUrlQueryParameter('https://example.com?k1=v1&k2=v2', 'k2') | 'v2' | Get query paramter value for 'k2' |
To view all the String functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article