-1

I need to link shipment numbers to the driver and display the data in the table

  • Note that I am using json server

Table

InSync
  • 4,851
  • 4
  • 8
  • 30

1 Answers1

0

You need to JSON.parse the ShippmentNumber. Then map over the array of numbers and wrap them with <a> tags.

Just an example we can replace the line <td>{shippment.ShippmentNumber}</td> with

<td>
  {JSON.parse(shippment.ShippmentNumber).map(number => {
    return <a key={number} href={`<shipment-path>/${number}`}>{number}</a>
  })}
</td>
Cristian Torres
  • 256
  • 3
  • 12