I have some Javascript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form:
You can use Lodash unescape / escape function https://lodash.com/docs/4.17.5#unescape
import unescape from 'lodash/unescape'; const str = unescape('fred, barney, & pebbles');
str will become 'fred, barney, & pebbles'
'fred, barney, & pebbles'