Contact Free trial Login

decodeURIComponent

decodeURIComponent(String): String

Decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or a similar routine.

For an example, see encodeURIComponent.

Parameters

Name Description

text

URI component string.

Example

This example decodes a variety of URI components.

Source

%dw 2.0
import * from dw::core::URL
output application/json
---
{
  "decodeURIComponent": {
    "decodeURIComponent" : decodeURIComponent("%20PATH/%20TO%20/DECODE%20"),
    "decodeURIComponent" : decodeURIComponent("%3B%2C%2F%3F%3A%40%26%3D"),
    "decodeURIComponent" : decodeURIComponent("%2D%5F%2E%21%7E%2A%27%28%29%24"),
  }
}

Output

{
   decodeURIComponent: {
     decodeURIComponent: " PATH/ TO /DECODE ",
     decodeURIComponent: ";,/?:@&=",
    decodeURIComponent: "-_.!~*'()\$"
   }
}

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.