如何将数组数据附加到逻辑应用程序中的数组变量? [英] How to append array data to array variable in logic app?

查看:15
本文介绍了如何将数组数据附加到逻辑应用程序中的数组变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 HTTP 连接器调用 API,以获取结果数组数据.并使用直到循环.所以每次我都会将一些记录放入结果数组中.

I'm calling API using HTTP connector getting result array data. and used until loop. so every time i will get some records into result array.

现在我想追加所有记录,以便我将所有这些记录.

Now I want to append all records so that i will those all.

就像我第一次得到 2 条如下记录,第二次得到 1 条记录,然后我想追加,这样总共有 3 条.

Like 1st time i got 2 records like below and 2nd time 1 then I want to append so that it will be 3 total.

第一次迭代结果 -

"results":[
{"id":"2","name":"t1"},{"id":"3","name":"t4"}
]

第二次迭代结果-

"results":[
  {"id":"66","name":"i7"}]

我想附加所有数据,以便最终结果类似于 -

I want to append all data so that final result will be like -

[{"id":"2","name":"t1"},{"id":"3","name":"t4"}, {"id":"66","name":"i7"}]

而不是 foreach 我尝试使用 append array variable 但它抛出错误 -

instead of foreach I tried using append array variable but it throws below error -

它是一种数组类型,需要附加字符串.

its a type of array need to be string to append.

我可以使用 foreach 来实现它,但是如果我们找到任何直接添加数组的方法,那么仅使用 foreach 添加值是没有意义的.

I can able to achieve it using foreach but it does not make sense just to add values use foreach instead if we found any way to directly add array it will be great.

推荐答案

你可以使用

结果:

请注意,如果您想使用此功能,您应该在工作流设置"边栏选项卡中创建一个集成帐户并与您的逻辑应用关联.

Please note if you want to use this feature , you should create an integration account and associated with your logic app in "Workflow settings" blade .

这篇关于如何将数组数据附加到逻辑应用程序中的数组变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆