【发布时间】:2021-03-20 13:20:34
【问题描述】:
this.tripDetails= [
{
"vehicleNumber": "TN 47 GR 3679",
"adminVehicleDTO": [
{
"tripId": 107,
"id": 1176,
"vehicleNumber": "TN 47 GR 3679",
"nominalType": "income",
"typeOfService": "REGULAR",
"amount": 250.0,
"vehicleId": 1,
"adhocVehicleId": null,
"reason": "Trip Income",
"reasonId": 71,
"description": null,
"remarks": null,
"deleteFlag": false
}]
},
{
"vehicleNumber": "KL 34 CV 6296",
"adminVehicleDTO": [
{
"tripId": 104,
"id": 1165,
"vehicleNumber": "KL 34 CV 6296",
"nominalType": "income",
"typeOfService": "REGULAR",
"amount": 0.0,
"vehicleId": null,
"adhocVehicleId": 32,
"reason": "Trip Income",
"reasonId": 71,
"description": null,
"remarks": null,
"deleteFlag": false
}]
},
{
"vehicleNumber": "AP 06 DE 4089",
"adminVehicleDTO": [
{
"tripId": 106,
"id": 1175,
"vehicleNumber": "AP 06 DE 4089",
"nominalType": "income",
"typeOfService": "REGULAR",
"amount": 0.0,
"vehicleId": 4,
"adhocVehicleId": null,
"reason": "Trip Income",
"reasonId": 71,
"description": null,
"remarks": null,
"deleteFlag": false
}]
}]
这是来自 API 的响应,我想根据角度打字稿中的 vehicleNumber 将其按升序或降序排列。我尝试了很多东西,但没有任何帮助。如果可能的话,提出一些想法来试试这个。谢谢
【问题讨论】:
标签: angular typescript