i have two arrays of objects
fetch1= [{
"A": 10
"X": mac
},
{
"A": 20
"X": Hp
}]
fetch2=[{
"B": 30
"Y": windows
},
{
"B":40
"Y": macfee
}]
Output should be like table
A | B |
---|---|
10 | 30 |
20 | 40 |
First "A" column in a table should display 10 & 30.
Second "B" column in a table should display 20 & 40.
Example:
<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>