我从逻辑应用中的 HTTP
操作收到这样的响应正文:
[
{
"refreshId": "08702296-a2ad-43c5-8729-71dc7af27361",
"startTime": "2019-02-28T14:53:34.9",
"endTime": "2019-02-28T15:03:52.62",
"status": "failed"
},
{
"refreshId": "30484b8a-1934-4ffa-9377-ac9e558614fe",
"startTime": "2019-02-08T20:20:51.2",
"endTime": "2019-02-08T20:20:51.9",
"status": "failed"
},
{
"refreshId": "34b23346-9b6c-4d94-bf77-adc129babaa1",
"startTime": "2019-02-17T05:37:48.067",
"endTime": "2019-02-18T07:11:44.167",
"status": "failed"
},
{
"refreshId": "4a9b715c-e4df-4beb-b1f4-ef696e0c23bb",
"startTime": "2019-03-05T16:05:22.97",
"endTime": "2019-03-05T16:28:15.01",
"status": "failed"
}
]
我想在 starttime
上对此正文进行排序,然后提取第一个正文的 refreshId
。我可以在逻辑应用程序中执行此操作吗?
最佳答案
您可以使用Select操作将所有startTime
值输出为刻度
数组:
然后使用过滤操作来查找具有最小或最大刻度值(取决于“第一个”的含义)刻度值的记录:
从那里,您可以使用 body('Filter_array')[0].refreshId
提取您要查找的数据。
关于json - 按值对 json 进行排序,然后提取第一个值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55045047/