从逻辑应用中的SQL JSON提取值
在逻辑应用中,我有一个针对提取SQL行的每个循环。 我想要我的输出-SP1'B506-1B205DB6DCD3'。
现在写,我可以得到 - “ value”:“ {” name“:” sp1“}'b506-1b205db6dcd3'”。
如何从上述SQL输出 - 仅SP1获取名称值?
"For_each": {
"actions": {
"Append_to_array_variable": {
"inputs": {
"name": "sp_name",
"value": "@concat(items('For_each'),'''',outputs('Compose'),'''')"
},
"runAfter": {},
"type": "AppendToArrayVariable"
}
}
目前,输出正在遵循
{
"name": "sp_name",
"value": "{\"NAME\":\"SP1\"}'b506-1b205db6dcd3'"
}
我希望从@concat(项目('for_each')中的值-sp1与另一个变量concat。
In logic app , I have a for each loop which extract the SQL rows.
I want my output - SP1'b506-1b205db6dcd3'.
Write now I am able to get - "value": "{"NAME":"SP1"}'b506-1b205db6dcd3'".
How can I get value of Name from the above SQL output - SP1 only?
"For_each": {
"actions": {
"Append_to_array_variable": {
"inputs": {
"name": "sp_name",
"value": "@concat(items('For_each'),'''',outputs('Compose'),'''')"
},
"runAfter": {},
"type": "AppendToArrayVariable"
}
}
Right now output is following
{
"name": "sp_name",
"value": "{\"NAME\":\"SP1\"}'b506-1b205db6dcd3'"
}
I want value - SP1 from @concat(items('For_each') to concat with another variable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我只是注意到有“结果”名称为执行SQL查询的输出,该输出为我提供了值。
I just noticed that there was 'Resultsets Name' as output of the execute sql query which is providing me that value.Regards.
考虑“ value”:“ {”名称“:” sp1“}'b506-1b205db6dcd3'”您可以使用以下表达式使用slice()来检索值{“ name”:“ sp1”}的值。
然后,我们可以使用
parse json
作为该特定表达式,并拔出name
值“ sp1”。这是我的逻辑应用程序
>
Considering "value": "{"NAME":"SP1"}'b506-1b205db6dcd3'" you can use slice() just to retrieve the value {"NAME":"SP1"} using the below expression.
and then we can use
Parse JSON
for that particular expression and pull out theNAME
value "SP1". Here is the flow of my logic appRESULTS: