Following is My JSON response format .
data:[
{status: "ACTIVE", zipcode: "500019", country: "India", city: "Hyderabad"}
{status: "ACTIVE", zipcode: "500026", country: "India", city: "Hyderabad"}
{status: "ACTIVE", zipcode: "500028", country: "India", city: "Hyderabad"}
]
I have tried the following code but to vain I don't find the expected results. i get the following error Expected an assignment or function call and instead saw an expression no-unused-expressions
{this.props.bkList && this.props.bkList['data'] && this.props.bkList['data'].map(row=>{
return(
<TableRow key={row.bankId}
hover
onClick={() => this.handleViewDetail(row.bankId)}
>
{Object.keys(row).forEach(function (key){
console.log(row[key]);
<TableCell>{row[key]}</TableCell>
})}
<TableCell>
<Button variant="contained" className={classes.button} onClick={(e)=>this.handleViewBranches(row.bankCode,e)}>
View
</Button>
</TableCell>
</TableRow>
)
})}
</TableBody>
Can anyone please lemme know where I'm going wrong?