I have a JSON questions.json:
{
"question1": "This is a <strong>cool</strong> question"
}
In my App.js I do:
import questions from './questions.json'
class App {
render () {
return (
<p>{questions["question1"]}</p>
)
}
That displays:
"This is a < strong> cool < /strong> question"
(Notice I escaped "<\strong>" because SO would render "bool" bold otherwise.)
instead of
"This is a cool question"
I can think of writing a recursion that finds each "strong" markup, but I am wondering if a way already exists.
Thanks