0
$ .. balanceChange를 사용하여 배열 정렬을 도와주세요. 그것은 응답의 작은 부분입니다.Jsonpath 정렬 배열
SoapUI에서 어설 션을 위해 필요합니다.
{ "id": 182, "name": "49899 Consol Sick w S&S Pattern", "eventDefinition": { "id": 111, "name": "49899 Consol Sick w S&S Pattern", "shortName": null, "displayName": "49899 Consol Sick w S&S Pattern", "active": true, "group": null, "lowerThresholdAmount": 0, "upperThresholdAmount": 0, "lowerThresholdDayAmount": null, "upperThresholdDayAmount": null, "amountUnit": null, "exceptionType": null, "comment": null, "paycode": null, "paycodeAmountType": null, "usedType": null, "punchType": null, "type": {"name": "pattern"}, "extendedData": null, "dayBased": false }, "policyDefinition": { "id": 404, "name": "49899 Consolidated Sick w S&S plc467381724319" }, "ruleDefinition": { "id": 604, "name": "WR467381724319" }, "pointTransaction": { "id": 313, "name": "Attendance Points 1", "employeeId": 385, "balanceChange": 5, "typeCategory": "POINT", "applyDate": "2016-04-28T00:00:00" }, "type": {"name": "pattern"}, "employeeId": 385, "applyDate": "2016-04-28", "eventTime": "00:00:00", "amount": null, "dayAmount": null, "updatedByUserId": 12, "isSystem": true }
어떻게 당신이 그것을 (ID, 이름 또는에 의해 객체)를 정렬 하시겠습니까? 더 자세한 설명을 주시겠습니까? – Anton
$ .. balanceChange를 실행하면 [9.0, 8.0, 9.0, 8.0, 8.0, 8.0, 6.0, 5.0]이됩니다. 그러나 때로는이 시퀀스가 변경되어 [8.0, 9.0, 9.0, 8.0, 8.0, 8.0, 6.0, 5.0]을 얻을 수 있습니다. 이 배열을 balanceChange로 정렬해야합니다. –
그래서 간단한 방법은 밑줄을 사용하는 것입니다. 답변을 보면 도움이 될 수 있습니다. 코드를 다시 작성하려고 시도하면 알려 드리겠습니다. – Anton