0

I am receiving the following data inside my API

Jacob's Syndrome

When I show it using foreach loop, the outcome comes as

Jacob's Syndrome

I want the decoded data (Jacob's Syndrome) that I am receiving from the API in order to store it in an array. Can anyone help me what sort of encoding / decoding do I have to perform?

Ali Zia
  • 3,825
  • 5
  • 29
  • 77
  • Possible duplicate of [HTML Entity Decode](https://stackoverflow.com/questions/5796718/html-entity-decode) – XCS Jun 03 '17 at 21:33
  • From server side convert from html entity to normal string then return to JS. Depending on server side technology the function will change. – DASH Jun 03 '17 at 21:36
  • Note that the first string is HTML, while the second one is text. HTML can contain a lot more than just text... – jcaron Jun 03 '17 at 22:33
  • see https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript – SuperStormer Jun 04 '17 at 00:19

0 Answers0