我有以下 json 对象,我喜欢将它们合并为一个对象,并根据“分钟”值缩短子对象。这对 JavaScript 可行吗?
[Object, Object, Object]
0: Object
Live: "188585"
Minute: "17"
Player: "Player A"
Team: "188564"
__proto__: Object
1: Object
Live: "188585"
Minute: "26"
Player: "Player B"
Team: "188564"
__proto__: Object
2: Object
Live: "188585"
Minute: "77"
Player: "Player A"
Team: "188564"
__proto__: Object
[Object, Object]
0: Object
Live: "188585"
Minute: "31"
Player: "Player C"
Team: "188558"
__proto__: Object
1: Object
Live: "188585"
Minute: "41"
Player: "Player D"
Team: "188558"
__proto__: Object
我喜欢这样的结果:
[Object, Object, Object, Object, Object]
0: Object
Live: "188585"
Minute: "17"
Player: "Player A"
Team: "188564"
__proto__: Object
1: Object
Live: "188585"
Minute: "26"
Player: "Player B"
Team: "188564"
__proto__: Object
2: Object
Live: "188585"
Minute: "31"
Player: "Player C"
Team: "188558"
__proto__: Object
3: Object
Live: "188585"
Minute: "41"
Player: "Player D"
Team: "188558"
__proto__: Object
4: Object
Live: "188585"
Minute: "77"
Player: "Player A"
Team: "188564"
__proto__: Object