0

我正面临着在 Azure 中使用逻辑 APP 执行 for 循环的问题。显然完整的剧本执行成功并且功能上它的工作良好。但是,我收到此错误,因为它将上一步中的“body”参数作为输入,仅此而已。正文是长 json,因此不应该是 foreach 循环的正确输入。我尝试添加帐户或 IP 地址作为输入,但也失败了。

输入

在此处输入图像描述

在此处输入图像描述

输出

在此处输入图像描述

请在这里帮忙

4

1 回答 1

0

As you mentioned there is just one item in your json data array which contains "MachineId", I assume the first item contains "MachineId". Please refer to the solution below, it will help you to use the only "MachineId" in the 24 cycles of your loop.

We can input an expression to use the "MachineId" in first item:

body('Parse_JSON')[0].MachineId

enter image description here (In the screenshot above, I just use a "Set variable" to replace your two actions in "For each" loop, but I think there is no difference between them)

Please have a try with this solution~

于 2020-01-07T10:54:17.587 回答