1//convert unicode to string
2
3// using a variable
4let unicodeString = "http\\u00253A\\u00252F\\u00252Fexample.com\u{1F4A9}\x61";
5console.log(decodeURIComponent(JSON.parse('"' + unicodeString.replace(/\"/g, '\\"') + '"')));
6
7// direct approach
8console.log(decodeURIComponent(JSON.parse('"http\\u00253A\\u00252F\\u00252Fexample.com\u{1F4A9}\x61"')));