我想根据来自redux页面的嵌套json对象创建动态表
<Table striped bordered hover responsive className="mt-2">
<thead>
{/* keys.map(header => <th>{this.state}</th>) */}
<tr>{/* I need dynaic TR */}</tr>
</thead>
<tbody>
{accounts && accounts.length ? (
accounts.map((account: any) => (
<tr
key={account.get("uuid")}
style={{ cursor: "pointer" }}
// onClick={() => this.props.history.push(match.url + '/' + application.get('uuid'), application)}
>
{/* <td> {account.get('uuid')} </td> */}
<td>{account.get("account_data")}</td>
<td>
{account.get("entitlements") && (
<ul>
{account
.get("entitlements")
.split(";")
.map((access: any) => (
<li>{access}</li>
))}
</ul>
)}
</td>
</tr>
))
) : (
<tr>
<td colSpan={5} style={{ textAlign: "center" }}>
No Accounts Found. Please sync and retry.
</td>
</tr>
)}
</tbody>
</Table>;
打印<td>{account.get('account_data') }</td>
后,我正在获取帐户数据。我想在account_data上创建表格。如何根据这些数据制作表格?
这是打印account_data