0
I am consuming a json where I have a key with the value of an html tag:
import React, { useState, useEffect} from "react";
export const CardHome = () => {
const [recebeDados, setRecebeDados] = useState([
{
jsonApi: {
atrr: [
{value:"<h1>Hello world</h1><p>Aqui eu renderizo um texto</p>"},
{value:"<h1>Hello</h1><p>Aqui eu renderizo um texto SEGUNDO</p>"},
{value:"<h1>Hello bRAZIL</h1><p>Aqui eu renderizo um TERCEIRO</p>"},
]
}
}
])
return(
<>
{recebeDados.map((e,i) => (
<ul key={i}>
<li>{e.value}</li>
</ul>
))}
</>
)
}
I would like to render the information without the HTML tags, will it be possible?
see if you can get help https://www.w3resource.com/javascript-exercises/javascript-string-exercise-35.php "strip_html" https://codepen.io/flourigh/pen/eYmjKW
– flourigh
Cannot do this without HTML.
– Dakota