【发布时间】:2021-10-30 10:14:22
【问题描述】:
i have two arrays of objects
fetch1= [{
"A": 10
"X": mac
},
{
"A": 20
"X": Hp
}]
fetch2=[{
"B": 30
"Y": windows
},
{
"B":40
"Y": macfee
}]
输出应该像表格
| A | B |
|---|---|
| 10 | 30 |
| 20 | 40 |
表中的第一个“A”列应显示 10 和 30。
表中的第二个“B”列应显示 20 和 40。
示例:
<ModalBody>
<Table>
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
{fetch1.map(obj => {
return <tr >{obj.A}</tr>;
})}
{fetch2.map(obj => {
return <td >{obj.B}</td>;
})}
</tr>
</tbody>
</Table>
</ModalBody>
【问题讨论】:
标签: reactjs react-native reactstrap react-modal