i use axios to get values, now i want to display the values in td tag in a loop how to execute it.
my code is :
let apiUrl = "http://api_url_here";
axios.get(apiUrl, {headers: headers})
.then((response) => {
console.log(response.data[0].provider.firstName);
//console.log(token);[0]
})
My td code is:
<tr>
<td className="font-weight-medium"> <img className="logo" src={jessica} alt="pam-logo" /> </td>
<td>[email protected] </td>
<td>(012)-876789876</td>
<td>Family Physician</td>
<td>23145655</td>
<td>Mountain view,Ave</td>
<td><Icon icon={editIcon} width="20px"/> <Icon icon={deleteIcon} width="20px"/></td>
</tr>
I need that response.data[0].provider.firstName in 1st td and correspondingly the same for all and it should be in loop to get next iteration.
response.data?