- HTTP request returns data with the following structure:
[
{
"statusCode": 200,
"headers": [
{
"name": "accept-ranges",
"value": "bytes"
},
{
"name": "content-type",
"value": "application/json"
},
{
"name": "last-modified",
"value": "Wed, 14 Feb 2024 21:05:08 GMT"
},
{
"name": "vary",
"value": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers"
},
{
"name": "x-current-token-count",
"value": "199"
},
{
"name": "x-envoy-upstream-service-time",
"value": "2566"
},
{
"name": "x-next-replenishment-time",
"value": "0"
},
{
"name": "x-tb",
"value": "1"
},
{
"name": "x-tb-optimization-total-bytes-saved",
"value": "0"
},
{
"name": "content-length",
"value": "1299"
},
{
"name": "expires",
"value": "Wed, 14 Feb 2024 21:05:08 GMT"
},
{
"name": "cache-control",
"value": "max-age=0, no-cache, no-store"
},
{
"name": "pragma",
"value": "no-cache"
},
{
"name": "date",
"value": "Wed, 14 Feb 2024 21:05:08 GMT"
},
{
"name": "connection",
"value": "close"
}
],
"cookieHeaders": [],
"data": {
"data": {
"estimates": [
{
"name": "SMART_POST",
"displayName": "FedEx Ground Economy",
"deliveryDate": "2024-02-20T23:59:00.000Z",
"estimatedRate": {
"amount": 9.05,
"currency": "USD"
},
"serviceTypeGroupName": "FEDEX_GROUND",
"serviceTypeGroupDisplayName": "FedEx Ground",
"isDeliveryPromiseFulfilled": true,
"carrierName": "FedEx",
"carrierDisplayName": "FedEx"
},
{
"name": "FEDEX_GROUND",
"displayName": "FedEx US Ground",
"deliveryDate": "2024-02-19T23:59:00.000Z",
"estimatedRate": {
"amount": 10.69,
"currency": "USD"
},
"serviceTypeGroupName": "FEDEX_GROUND",
"serviceTypeGroupDisplayName": "FedEx Ground",
"isDeliveryPromiseFulfilled": true,
"carrierName": "FedEx",
"carrierDisplayName": "FedEx"
},
{
"name": "FEDEX_2_DAY",
"displayName": "FedEx 2Day",
"deliveryDate": "2024-02-16T17:00:00.000Z",
"estimatedRate": {
"amount": 11.05,
"currency": "USD"
},
"serviceTypeGroupName": "FEDEX_EXPRESS",
"serviceTypeGroupDisplayName": "FedEx Express",
"isDeliveryPromiseFulfilled": true,
"carrierName": "FedEx",
"carrierDisplayName": "FedEx"
},
{
"name": "FEDEX_EXPRESS_SAVER",
"displayName": "FedEx Express Saver",
"deliveryDate": "2024-02-19T17:00:00.000Z",
"estimatedRate": {
"amount": 11.05,
"currency": "USD"
},
"serviceTypeGroupName": "FEDEX_EXPRESS",
"serviceTypeGroupDisplayName": "FedEx Express",
"isDeliveryPromiseFulfilled": true,
"carrierName": "FedEx",
"carrierDisplayName": "FedEx"
}
]
}
},
"fileSize": 1299
}
]
- I can find the lowest amount in the estimatedRate collection
- but I need to find associated ānameā field value from the collection that contains the matching estimatedRate
The function:
{{min(map(map(39.data.data.estimates; āestimatedRateā); āamountā))}}
Returns the lowest amount value, but I donāt know how to find the āSMART_POSTā name in the corresponding collection that contained it.
NVM I solved it with:
{{get(sort(39.data.data.estimates; āascā; 39.data.data.estimates.estimatedRate.amount); ā1.nameā)}}