0

I have JSON and accessed text in it by using JSON.stringify. The example text looks like this:

This is a test – More tests

What I want to do is replace the &#8211 character with the - character. This method is fine for one single character but I want to filter out most of the other characters and therefore I don't want to do a hundred if-statements.

How do I do this in JavaScript, is there a way to replace the HTML entity character codes by their actual characters?

OldMcDonald
  • 594
  • 13
  • 36

0 Answers0