const DenseTable=({x,y,table})=> {
return(
<><tbody>
{table.map((item)=>
<tr style={{backgroundColor:" #f3f6f9"}}>
<td>P{item.priority}</td>
<td>{item.Artificial}</td>
<td>{item.Natural}</td>
</tr>
)}
</tbody>
</>
</tbody>
instead of item.Artificial, I need to use item.x (x being the prop). what should be the syntax?
item[x]