如何在逻辑应用程序中使用组合连接器创建新的json对象而不更改顺序? [英] how to create new json object using compose connector in logic app without change in order?

查看:30
本文介绍了如何在逻辑应用程序中使用组合连接器创建新的json对象而不更改顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有逻辑应用程序,并在 compose连接器中创建了一个json有效负载但保存后会以 asc顺序

I have logic app and created a json payload into compose connector but after save it is coming as asc order

如何维护订单

原始json是-

{
"mainId":"2323",
"address":"DC"
}

但是保存后,它会自动以-

But after save this it automatically coming it as -

{
"address":"DC",
"mainId":"2323"
}

推荐答案

如果仅编写数据,它将显示asc顺序,因为JavaScript JSON库默认为属性的字母顺序.因此,这是一种预期的行为,如果您坚持使用JSON格式,则不会产生副作用.在其他情况下,例如转换为XML.

If you just compose the data, it will show asc order cause JavaScript JSON libraries default to alphabetical ordering of properties. So this is an expected behaviour that shouldn't have side effects if you stick to the JSON format. In other scenarios, like converting to XML.

如果您坚持自定义顺序,可以尝试使用我的.我创建了json格式的字符串,然后对其进行了组合或将其解析为json.

If you insist on the custom order you could try with my. I create the json format string then compose it or parse it to json.

您可以尝试解析json 动作,它们都可以工作.希望对您有帮助.

You could try compose or parse json action, they all could work. Hope this could help you.

这篇关于如何在逻辑应用程序中使用组合连接器创建新的json对象而不更改顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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