Here is the sample json body. Have to sort it out based on troubleCause[0]/endDate
[
{
“id”: “0418155019”,
“contractualOutageDuration”: 0,
“externalId”: “0418155019”,
“creationDate”: “2024-04-18T15:52:42Z”,
“detectionDate”: “2024-04-18T15:50:00Z”,
“hasAlreadyWorked”: true,
“href”: “/troubleTicket/0418155019”,
“interventionDate”: “2024-04-29T15:49:00Z”,
“isWebTicket”: true,
“lastUpdate”: “2024-04-29T15:51:45Z”,
“isNotificationEnable”: false,
“isONBHFollowupEnable”: false,
“openhourTotalFreezeDuration”: 0,
“outageDuration2424”: 0,
“plannedRestorationDate”: “2024-04-29T15:49:00Z”,
“supervisionTool”: “outil de supervision”,
“description”: “Ticket EAI”,
“outageDurationSupport”: 0,
“timeZoneId”: “54”,
“totalFreezeDuration2424”: 0,
“troubleSignalisationQuantity”: 0,
“category”: {
“id”: “1”,
“label”: “Interrupted service”
},
“channel”: {
“id”: “GOELAND”,
“name”: “External System”
},
“monitoring”: {
“mode”: “0”
},
“organisationVisibility”: [
{
“id”: “101”
},
{
“id”: “102”
},
{
“id”: “104”
},
{
“id”: “105”
},
{
“id”: “106”
},
{
“id”: “107”
},
{
“id”: “108”
},
{
“id”: “115”
},
{
“id”: “119”
},
{
“id”: “146”
},
{
“id”: “150”
},
{
“id”: “152”
},
{
“id”: “153”
},
{
“id”: “166”
},
{
“id”: “181”
},
{
“id”: “194”
},
{
“id”: “EQ”
},
{
“id”: “FT”
},
{
“id”: “OC”
},
{
“id”: “OF”
},
{
“id”: “ONE”
},
{
“id”: “SI”
},
{
“id”: “TPC”
}
],
“origin”: {
“id”: “2”,
“label”: “Supervision”
},
“status”: [
{
“code”: “InProgress”,
“isCurrentStatus”: false,
“startDate”: “2024-04-18T15:50:00Z”
},
{
“code”: “Restored”,
“isCurrentStatus”: false,
“startDate”: “2024-04-29T15:49:00Z”
},
{
“code”: “Resolved”,
“isCurrentStatus”: false,
“startDate”: “2024-04-29T15:49:00Z”
},
{
“code”: “Closed”,
“isCurrentStatus”: true,
“reason”: “Ticket cloturé par 1WX”,
“startDate”: “2024-04-29T15:49:00Z”
}
],
“troubleTicketCharacteristic”: [
{
“id”: “11”,
“name”: “CustomizedInformation”,
“value”: “N”
}
],
“ticketType”: {
“id”: “1”,
“label”: “Failure”
},
“troubleCause”: [
{
“label”: “pb 00000”,
“endDate”: “2024-04-28T15:49:00Z”,
“id”: 7,
“isRootCause”: true,
“outageDuration”: 3910,
“startDate”: “2024-04-18T15:50:00Z”,
“problemCategory”: {
“id”: “0”,
“label”: “Isolated customer site”
},
“problemDetail”: {
“id”: “00000”,
“label”: “Fault noticed on your private installation”
},
“problemResponsibility”: {
“id”: “000”,
“label”: “Customer”
}
},
{
“label”: “pb 00001”,
“endDate”: “2024-04-29T15:49:00Z”,
“id”: 8,
“isRootCause”: false,
“outageDuration”: 289,
“startDate”: “2024-04-28T15:49:00Z”,
“problemCategory”: {
“id”: “1”,
“label”: “Interrupted service”
},
“problemDetail”: {
“id”: “00001”,
“label”: “Equipment on customer site turned off”
},
“problemResponsibility”: {
“id”: “000”,
“label”: “Customer”
}
}
],
“relatedParty”: [
{
“id”: “TPC”,
“label”: “SCE”,
“@referredType”: “Organisation”,
“role”: “BusinessEntityOwner”
},
{
“id”: “ATQC31”,
“label”: “CSO DEL CSD Mars”,
“@referredType”: “Organisation”,
“role”: “LastActor”
},
{
“familyName”: “Compte Tests Auto Oceane”,
“id”: “MMMM3999”,
“@referredType”: “Individual”,
“role”: “LastActor”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
},
{
“id”: “5131670”,
“@referredType”: “Organisation”,
“role”: “Customer”,
“tradingName”: “Mars Information Services Inc”
},
{
“id”: “ATQC31”,
“label”: “CSO DEL CSD Mars”,
“@referredType”: “Organisation”,
“role”: “CustomerRepresentative”
},
{
“familyName”: “ATRISH Kunal”,
“id”: “VJRZ4467”,
“@referredType”: “Individual”,
“role”: “CustomerRepresentative”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
},
{
“id”: “ATQC31”,
“label”: “CSO DEL CSD Mars”,
“@referredType”: “Organisation”,
“role”: “TroubleResolutionLeader”
}
],
“partyIntervention”: [
{
“contributorAction”: {
“impactId”: “2092263606”
},
“interventionStatus”: [
{
“date”: “2024-04-18T15:52:43Z”,
“status”: “Accepted”
}
],
“relatedParty”: [
{
“id”: “ATQC31”,
“@referredType”: “Organisation”,
“role”: “TroubleResolutionLeader”
},
{
“familyName”: “ATRISH Kunal”,
“id”: “VJRZ4467”,
“@referredType”: “Individual”,
“role”: “TroubleResolutionLeader”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
}
]
},
{
“level”: “1”,
“contributorAction”: {
“impactId”: “2092263606”
},
“interventionStatus”: [
{
“date”: “2024-04-18T15:52:44Z”,
“status”: “Requested”
},
{
“date”: “2024-04-18T15:52:44Z”,
“status”: “Accepted”
},
{
“date”: “2024-04-29T15:51:45Z”,
“status”: “Completed”
}
],
“relatedParty”: [
{
“familyName”: “ATRISH Kunal”,
“id”: “VJRZ4467”,
“@referredType”: “Individual”,
“role”: “Requestor”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
},
{
“id”: “ATQC31”,
“@referredType”: “Organisation”,
“role”: “RequestorGroup”
},
{
“id”: “00XTEST”,
“@referredType”: “Organisation”,
“role”: “TroubleResolutionContributor”
},
{
“familyName”: “Compte Tests Auto Oceane”,
“id”: “MMMM3999”,
“@referredType”: “Individual”,
“role”: “TroubleResolutionContributor”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
}
]
}
],
“relatedService”: {
“isLocalContactsApproved”: true,
“id”: “99414001”,
“referredService”: true,
“serviceSpecCharacteristic”: [
{
“id”: “IOID”,
“index”: “1”,
“name”: “Installed offer Id”,
“value”: “12-6739664”
}
],
“serviceSet”: {
“id”: “430077”
},
“serviceSpecification”: {
“category”: “AUTRES”,
“id”: “IO_DOS”,
“name”: “IO-Deployment and Op. Suprt.”
},
“relatedParty”: [
{
“id”: “5131670”,
“@referredType”: “Organisation”,
“role”: “Customer”,
“tradingName”: “Mars Information Services Inc”,
“externalReference”: [
{
“id”: “686849”,
“name”: “ICO1”
}
]
}
],
“supportingResource”: [
{
“name”: “A_extremity”,
“@referredType”: “Resource”,
“place”: {
“name”: “PGA”,
“role”: “A_extremitySite”,
“@referredType”: “GeographicSite”,
“geographicAddress”: {
“city”: “Ponta Grossa”,
“country”: “BR”,
“postcode”: “84043-450”,
“streetSupplement”: “Loc : Mars Brasil / Building : Office / Floor : Terreo / Room : Compouter Room”,
“streetName”: “Rodovia BR 376, KM 509”
}
},
“relatedParty”: [
{
“familyName”: ““,
“@referredType”: “Individual”,
“role”: “Customer”,
“tradingName”: “Mars Information Services Inc”
}
]
}
]
}
},
{
“id”: “0418155020”,
“contractualOutageDuration”: 0,
“externalId”: “0418155019”,
“creationDate”: “2024-04-18T15:52:42Z”,
“detectionDate”: “2024-04-18T15:50:00Z”,
“hasAlreadyWorked”: true,
“href”: “/troubleTicket/0418155019”,
“interventionDate”: “2024-04-29T15:49:00Z”,
“isWebTicket”: true,
“lastUpdate”: “2024-04-29T15:51:45Z”,
“isNotificationEnable”: false,
“isONBHFollowupEnable”: false,
“openhourTotalFreezeDuration”: 0,
“outageDuration2424”: 0,
“plannedRestorationDate”: “2024-04-29T15:49:00Z”,
“supervisionTool”: “outil de supervision”,
“description”: “Ticket EAI”,
“outageDurationSupport”: 0,
“timeZoneId”: “54”,
“totalFreezeDuration2424”: 0,
“troubleSignalisationQuantity”: 0,
“category”: {
“id”: “1”,
“label”: “Interrupted service”
},
“channel”: {
“id”: “GOELAND”,
“name”: “External System”
},
“monitoring”: {
“mode”: “0”
},
“organisationVisibility”: [
{
“id”: “101”
},
{
“id”: “102”
},
{
“id”: “104”
},
{
“id”: “105”
},
{
“id”: “106”
},
{
“id”: “107”
},
{
“id”: “108”
},
{
“id”: “115”
},
{
“id”: “119”
},
{
“id”: “146”
},
{
“id”: “150”
},
{
“id”: “152”
},
{
“id”: “153”
},
{
“id”: “166”
},
{
“id”: “181”
},
{
“id”: “194”
},
{
“id”: “EQ”
},
{
“id”: “FT”
},
{
“id”: “OC”
},
{
“id”: “OF”
},
{
“id”: “ONE”
},
{
“id”: “SI”
},
{
“id”: “TPC”
}
],
“origin”: {
“id”: “2”,
“label”: “Supervision”
},
“status”: [
{
“code”: “InProgress”,
“isCurrentStatus”: false,
“startDate”: “2024-04-18T15:50:00Z”
},
{
“code”: “Restored”,
“isCurrentStatus”: false,
“startDate”: “2024-04-29T15:49:00Z”
},
{
“code”: “Resolved”,
“isCurrentStatus”: false,
“startDate”: “2024-04-29T15:49:00Z”
},
{
“code”: “Closed”,
“isCurrentStatus”: true,
“reason”: “Ticket cloturé par 1WX”,
“startDate”: “2024-04-29T15:49:00Z”
}
],
“troubleTicketCharacteristic”: [
{
“id”: “11”,
“name”: “CustomizedInformation”,
“value”: “N”
}
],
“ticketType”: {
“id”: “1”,
“label”: “Failure”
},
“troubleCause”: [
{
“label”: “pb 00000”,
“endDate”: “2024-04-28T15:49:00Z”,
“id”: 7,
“isRootCause”: true,
“outageDuration”: 3910,
“startDate”: “2024-04-18T15:50:00Z”,
“problemCategory”: {
“id”: “0”,
“label”: “Isolated customer site”
},
“problemDetail”: {
“id”: “00000”,
“label”: “Fault noticed on your private installation”
},
“problemResponsibility”: {
“id”: “000”,
“label”: “Customer”
}
},
{
“label”: “pb 00001”,
“endDate”: “2024-04-29T15:49:00Z”,
“id”: 8,
“isRootCause”: false,
“outageDuration”: 289,
“startDate”: “2024-04-28T15:49:00Z”,
“problemCategory”: {
“id”: “1”,
“label”: “Interrupted service”
},
“problemDetail”: {
“id”: “00001”,
“label”: “Equipment on customer site turned off”
},
“problemResponsibility”: {
“id”: “000”,
“label”: “Customer”
}
}
],
“relatedParty”: [
{
“id”: “TPC”,
“label”: “SCE”,
“@referredType”: “Organisation”,
“role”: “BusinessEntityOwner”
},
{
“id”: “ATQC31”,
“label”: “CSO DEL CSD Mars”,
“@referredType”: “Organisation”,
“role”: “LastActor”
},
{
“familyName”: “Compte Tests Auto Oceane”,
“id”: “MMMM3999”,
“@referredType”: “Individual”,
“role”: “LastActor”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
},
{
“id”: “5131670”,
“@referredType”: “Organisation”,
“role”: “Customer”,
“tradingName”: “Mars Information Services Inc”
},
{
“id”: “ATQC31”,
“label”: “CSO DEL CSD Mars”,
“@referredType”: “Organisation”,
“role”: “CustomerRepresentative”
},
{
“familyName”: “ATRISH Kunal”,
“id”: “VJRZ4467”,
“@referredType”: “Individual”,
“role”: “CustomerRepresentative”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
},
{
“id”: “ATQC31”,
“label”: “CSO DEL CSD Mars”,
“@referredType”: “Organisation”,
“role”: “TroubleResolutionLeader”
}
],
“partyIntervention”: [
{
“contributorAction”: {
“impactId”: “2092263606”
},
“interventionStatus”: [
{
“date”: “2024-04-18T15:52:43Z”,
“status”: “Accepted”
}
],
“relatedParty”: [
{
“id”: “ATQC31”,
“@referredType”: “Organisation”,
“role”: “TroubleResolutionLeader”
},
{
“familyName”: “ATRISH Kunal”,
“id”: “VJRZ4467”,
“@referredType”: “Individual”,
“role”: “TroubleResolutionLeader”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
}
]
},
{
“level”: “1”,
“contributorAction”: {
“impactId”: “2092263606”
},
“interventionStatus”: [
{
“date”: “2024-04-18T15:52:44Z”,
“status”: “Requested”
},
{
“date”: “2024-04-18T15:52:44Z”,
“status”: “Accepted”
},
{
“date”: “2024-04-29T15:51:45Z”,
“status”: “Completed”
}
],
“relatedParty”: [
{
“familyName”: “ATRISH Kunal”,
“id”: “VJRZ4467”,
“@referredType”: “Individual”,
“role”: “Requestor”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
},
{
“id”: “ATQC31”,
“@referredType”: “Organisation”,
“role”: “RequestorGroup”
},
{
“id”: “00XTEST”,
“@referredType”: “Organisation”,
“role”: “TroubleResolutionContributor”
},
{
“familyName”: “Compte Tests Auto Oceane”,
“id”: “MMMM3999”,
“@referredType”: “Individual”,
“role”: “TroubleResolutionContributor”,
“contactMedium”: [
{
“preferred”: true,
“type”: “Email”,
“medium”: {
“emailAddress”: “[email protected]”
}
}
]
}
]
}
],
“relatedService”: {
“isLocalContactsApproved”: true,
“id”: “99414001”,
“referredService”: true,
“serviceSpecCharacteristic”: [
{
“id”: “IOID”,
“index”: “1”,
“name”: “Installed offer Id”,
“value”: “12-6739664”
}
],
“serviceSet”: {
“id”: “430077”
},
“serviceSpecification”: {
“category”: “AUTRES”,
“id”: “IO_DOS”,
“name”: “IO-Deployment and Op. Suprt.”
},
“relatedParty”: [
{
“id”: “5131670”,
“@referredType”: “Organisation”,
“role”: “Customer”,
“tradingName”: “Mars Information Services Inc”,
“externalReference”: [
{
“id”: “686849”,
“name”: “ICO1”
}
]
}
],
“supportingResource”: [
{
“name”: “A_extremity”,
“@referredType”: “Resource”,
“place”: {
“name”: “PGA”,
“role”: “A_extremitySite”,
“@referredType”: “GeographicSite”,
“geographicAddress”: {
“city”: “Ponta Grossa”,
“country”: “BR”,
“postcode”: “84043-450”,
“streetSupplement”: “Loc : Mars Brasil / Building : Office / Floor : Terreo / Room : Compouter Room”,
“streetName”: “Rodovia BR 376, KM 509”
}
},
“relatedParty”: [
{
“familyName”: ““,
“@referredType”: “Individual”,
“role”: “Customer”,
“tradingName”: “Mars Information Services Inc”
}
]
}
]
}
}
]
I want to sort this json based on troubleCause[0]/endDate using JavaScript
Intakhab Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1