I've been developing a website using the YouTube A.P.I.
Within the description
tag in the JSON file are line breaks \n
I need to convert these tags to HTML format
VideoDescriptions.push(item.snippet.description);
["Example description\nPlease click the link", "Another example description\nMore info"]
Edit:
This question is NOT a duplicate of the linked article because:
- It's using the YouTube API to retrieve data
- It's necessary to edit from an array rather than the string (as described in the article)
- The answers in either question could lead to different results and may not apply
](http://stackoverflow.com/questions/5076466/javascript-replace-n-with-br) – Gerardo Furtado Sep 08 '16 at 06:16