I am trying to decode the string value using atob
. The value of string which I got from the backend starts with . Now string is getting it to
\
.
In the attached screenshot when value base64String passed to atob
it shows single and in the parameter shows the value with
\
. When execute console.log('x4c693...')
in browser console it works but when executed console.log('\x4c693...')
it fails with error saying DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
How to decode this type of string.