我有一个对象数组,我想从中获取值:
lastChanceSeats: Object
assignedSeats: Array[6]
0: Object
SeatId: "29A"
passengerName: "Mr test1 test1"
sectorSequence: 1
1: Object
SeatId: "22A"
passengerName: "Mr test1 test1"
sectorSequence: 2
2: Object
SeatId: "29B"
passengerName: "Mrs test2 test2"
sectorSequence: 1
3: Object
SeatId: "22B"
passengerName: "Mrs test2 test2"
sectorSequence: 2
4: Object
SeatId: "29C"
passengerName: "Master test3 test3"
sectorSequence: 1
5: Object
SeatId: "22C"
passengerName: "Master test3 test3"
sectorSequence: 2
我想以以下格式显示数据:
- 第一个 {passengerName}
- {sectorSequence: 1} + {SeatId}
- {sectorSequence: 2} + {SeatId}
...然后乘客二、三等也一样。