0

I am fetching data from database to react-bootstrap table in JSON format. One field is url and displayed as string. How can I change it to link and redirect to the respective site? For instance, if json.url = "www.google.com", cell should display json.url and onClick it should redirect to google site.

usergs
  • 1,344
  • 3
  • 9
  • 18

1 Answers1

0

Try this:

<td>
    <a href={json.url}>{json.url}</a>
</td>
tsteve
  • 549
  • 1
  • 7
  • 16