有没有一种方法可以在不使用内联js的情况下获取json键

时间:2020-09-08 13:50:54

标签: azure azure-logic-apps

在Logic Apps中,有没有一种方法可以使用标准块从.json对象中获取像这样的内容: {“ a”:1,“ b”:2,“ c”:3}到这样的键数组:[“ a”,“ b”,“ c”]?任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:0)

有两种方法可以满足您的需求。如果您不想使用内联代码,则可以直接查看第二种方法,但是我建议您使用内联代码,因为它确实简单得多

1。内联代码

如果您不熟悉内联代码,则可以研究official document。这是我为您设计的逻辑应用程序的工作流程:

enter image description here

您需要注意的是,使用内联代码需要一个集成帐户。请在Azure门户中搜索集成帐户:

enter image description here

选择Add创建一个新的integration accountenter image description here

单击Review+Create创建一个集成帐户。 enter image description here

在逻辑应用程序中,选择您创建的集成帐户: enter image description here

我已经为您测试过了,结果是可以预期的。 enter image description here

2。。第二种方法是分割字符串,这比较麻烦

enter image description here enter image description here enter image description here enter image description here

最终测试结果也可以达到预期: enter image description here