For loop 如何将http输出正文循环到logic app以保存excel工作表中的每一行? 如何为这个逻辑应用程序考虑JSON模式,传递数组(“结果”,用于架构下面)。 其中应获得每个u_品牌、u_平台、名称和其他所有值的更新excel表行
1.创建excel工作表 2.触发传递到JSON解析的http正文 3.使用前面步骤中选择的输出进行for循环。 4.在excel表格中传递每个数据 我收到错误信息: ExpressionEvaluation失败。执行模板操作“For_each”失败:“foreach”表达式“@body('Parse_JSON')”的计算结果为“Object”类型。结果必须是有效数组。For loop 如何将http输出正文循环到logic app以保存excel工作表中的每一行? 如何为这个逻辑应用程序考虑JSON模式,传递数组(“结果”,用于架构下面)。 其中应获得每个u_品牌、u_平台、名称和其他所有值的更新excel表行,for-loop,azure-logic-apps,jsonparser,For Loop,Azure Logic Apps,Jsonparser,1.创建excel工作表 2.触发传递到JSON解析的http正文 3.使用前面步骤中选择的输出进行for循环。 4.在excel表格中传递每个数据 我收到错误信息: ExpressionEvaluation失败。执行模板操作“For_each”失败:“foreach”表达式“@body('Parse_JSON')”的计算结果为“Object”类型。结果必须是有效数组。 { "body": { "result": [ {
{
"body": {
"result": [
{
"number": "",
"u_brand": {
"display_value": "A"
},
"location.full_name": "North America/North America/North America MCO/United States",
"name": "username",
"location": {
"display_value": "United States"
},
"u_platform": {
"display_value": "TWH"
},
"u_brand.u_division": "Corporate"
},
{
"number": "",
"u_brand": {
"display_value": "B"
},
"location.full_name": "Latin America/Latin America/Brazil/Brazil",
"name": "username2",
"location": {
"display_value": "Brazil"
},
"u_platform": {
"display_value": "Adobe"
},
"u_brand.u_division": "Food and Refreshment"
}
]
}
}
image:
[1]: https://i.stack.imgur.com/aThcg.png
请在
中为每个
使用结果
:
如果使用Body
,它将使用Body循环,Body是对象
类型
Json模式如下所示:
{
"properties": {
"body": {
"properties": {
"result": {
"items": {
"properties": {
"location": {
"properties": {
"display_value": {
"type": "string"
}
},
"type": "object"
},
"location.full_name": {
"type": "string"
},
"name": {
"type": "string"
},
"number": {
"type": "string"
},
"u_brand": {
"properties": {
"display_value": {
"type": "string"
}
},
"type": "object"
},
"u_brand.u_division": {
"type": "string"
},
"u_platform": {
"properties": {
"display_value": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"number",
"u_brand",
"location.full_name",
"name",
"location",
"u_platform",
"u_brand.u_division"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
}
获取错误:ExpressionEvaluationFailed。执行模板操作“For_each”失败:“foreach”表达式“@body('Parse_JSON')?['body']?['result']”的计算结果为“Null”类型。结果必须是有效数组。您的json似乎有问题,请检查。您可以创建一个变量并将其键入以进行检查。也可以检查
Http
返回的json
是否正确。