I tried show for each item in data array only the name key I need to show it with table.
const data = [{id: "111", name: "Danny", city: "NYC"},
{id: "222", name: "Roni", city: "LDN},
{id: "333", name: "Suzi", city: "TLV",
{id: "444", name: "John", city: "SF"}
]
const config = [{fieldToShow: "name"}]
<tbody>
{data.map((row) => {
return (
<tr>
{config.map((value) => {
return <td>{row[value.field]}</td>;
})}
</tr>
);
})}
but it not work …