I'm developing an application in React.Js.
I have the array:
array = [
{
"id": 1,
"date": {
"id": 1,
"name": "202001"
},
"item": {
"id": 1,
"name": "I1"
},
"price": 100
},
{
"id": 2,
"date": {
"id": 2,
"name": "202002"
},
"item": {
"id": 1,
"name": "I1"
},
"price": 200
},
{
"id": 3,
"date": {
"id": 2,
"name": "202002"
},
"item": {
"id": 2,
"name": "I2"
},
"price": 300
},
]
And I show the data as shown in the table:
ITEM |
202001 |
202002 |
TOTAL |
I1 |
100 |
200 |
300 |
I2 |
- |
300 |
300 |
TOTAL |
100 |
500 |
600 |
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…