I have an object
{
id: 10,
email: "test@gmail.com",
roles: Array(1),
firstName: "toto",
lastName: "tata"
}
I would like to display only test@gmail.com,
toto
, tata
and exclude id
and role
So I did this but I don't know how to exclude id and role. I tried with filter but it's not working.. Does anyone know how to do that?
const datas = Object.entries(data).map(([key, value]) => {
return (
<div key={key.id}>
<p>
{value}
</p>
</div>
);
});