The following code is to put the json response to a web page as an actual html. The json response is a String.
{this.props.posts && this.props.posts.length > 0 && this.props.posts.map((p) => (
<div className='blog-post' key={p.id}>
<div className='blog-post-top-image'>
<img src={p.image.url} />
</div>
<div className='blog-post-content'>
<h1>{p.title}</h1>
<p className='blog-post-posted-on'>{p.publishedAt}</p>
<div className='blog-post-text'>
<p className='blog-post-text-p'>{p.body}</p>
</div>
</div>
</div>
))}
{p.body}
consist of a String of "<p>some text here</p>\n<p>another text..."
.
How do I display it as a proper html on the page?