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