提取变量中的数组元素
Extract elements of an array in a variable
我在我的逻辑应用程序中定义了这样一个变量:
"Date": {
"inputs": {
"variables": [
{
"name": "Date",
"type": "Array",
"value": [
"2019-04-02",
"2019-04-03"
]
}
]
},
"runAfter": {},
"type": "InitializeVariable"
}
在 for eachloop 的下一步中,我想使用此数组中的每个项目,因此我使用此代码:
"body": {
"CommitMode": "transactional",
"MaxParallelism": 20,
"Objects": [
{
"partition": "@concat('Table_',variables('Date'))",
"table": "Table"
}
],
"RetryCount": 0,
"Type": "Full"
}
但在 运行 我的逻辑应用程序输出后,我看到以下内容:
{
"CommitMode": "transactional",
"MaxParallelism": 20,
"Objects": [
{
"partition": "Table_[\"2019-04-02\",\"2019-04-03\"]",
"table": "Table"
}
],
"RetryCount": 0,
"Type": "Full"
}
你知道如何在逻辑应用程序中提取数组的每个元素吗?
你可以用For each
来拼接数组,下面是我的测试。
然后响应结果数组。
假设这就是你想要的,希望这对你有所帮助。
我在我的逻辑应用程序中定义了这样一个变量:
"Date": {
"inputs": {
"variables": [
{
"name": "Date",
"type": "Array",
"value": [
"2019-04-02",
"2019-04-03"
]
}
]
},
"runAfter": {},
"type": "InitializeVariable"
}
在 for eachloop 的下一步中,我想使用此数组中的每个项目,因此我使用此代码:
"body": {
"CommitMode": "transactional",
"MaxParallelism": 20,
"Objects": [
{
"partition": "@concat('Table_',variables('Date'))",
"table": "Table"
}
],
"RetryCount": 0,
"Type": "Full"
}
但在 运行 我的逻辑应用程序输出后,我看到以下内容:
{
"CommitMode": "transactional",
"MaxParallelism": 20,
"Objects": [
{
"partition": "Table_[\"2019-04-02\",\"2019-04-03\"]",
"table": "Table"
}
],
"RetryCount": 0,
"Type": "Full"
}
你知道如何在逻辑应用程序中提取数组的每个元素吗?
你可以用For each
来拼接数组,下面是我的测试。
然后响应结果数组。
假设这就是你想要的,希望这对你有所帮助。