I have this url that im trying to decode
var a = 'https%3A%2F%2Fwww.gem.com%2Fextension%3Furl%3D'
var b = decodeURI(a)
console.log(b)
"https%3A%2F%2Fwww.gem.com%2Fextension%3Furl%3D"
What am I doing wrong?
You need to use decodeURIComponent():
var a = 'https%3A%2F%2Fwww.gem.com%2Fextension%3Furl%3D';
var b = decodeURIComponent(a);
console.log(b);