I have the code below which is in JSX format. r.invoice_details gives me an output that looks like this
{"rate":1522,"quantity":1,"discount":null,"itemName":"Gold Members club (offline)","amount":1522,"noEdit":true}
It's in a form of string. All I want is itemName inside the string to be displayed. What's the best way to write as an inline function?
{
id: "itemName",
label: "Item",
customCell: (r, i) => {
return <td key={`${i}-itemName`}>
{r.invoice_details}
</td>;
}
},