0

I'm currently facing an issue while building my first app as hobby, The problem is that I receive some json data from a web request and this data is divided into arrays, here I decode my data using JSONDecoder() because I want to display the elements in my app. But some texts elements are HTML strings with some HTML tags (<p.> <br.>) and this is a problem because these tags are shown with the text.

How can I get rid of these tags so my text is readable.

Thanks you so much

  • Help yourself by searching for 'swift convert html into plain text' or use `NSAttributedString` to read HTML text, which will let you return plain text. – El Tomato Aug 17 '21 at 05:55
  • Thanks you so much @jnpdx, it was just what I was looking for ! I don't know why I did not find this post when I was looking for a solution... – François BDC Aug 17 '21 at 17:14

0 Answers0