【发布时间】:2020-06-11 22:33:26
【问题描述】:
我的 json 有效负载如下:
Attributes:{
Contact:{
Address:{
PersonName:"John",
Line1:"sdsds",
Line2:"sdsdsd",
SubAddress:{
PersonName:"John",
Line1:"ggghg",
Line2:"xzxzxzx"
}
},
Phone:{
Home:"2323232323",
Office:"4545454545"
}
},
Id:"2343434",
order:"3343434"
}
我想将层次结构展平到输出下方
Attributes:{
Contact.Address.PersonName:"John",
Contact.Address.Line1:"sdsds",
Contact.Address.Line2:"sdsdsd",
Contact.Address.SubAddress.PersonName:"John",
Contact.Address.SubAddress.Line1:"ggghg",
Contact.Address.SubAddress.Line2:"xzxzxzx",
Contact.Phone.Home:"2323232323",
Contact.Phone.Office:"4545454545",
Id:"2343434",
order:"3343434"
}
Attributes 元素可以包含任意数量的复杂元素,例如“Address”和“Contact”。在编码时,我们不会知道复杂元素的键值。 DWL 应该能够产生单级输出。想要在 Mule 3 中使用 dw1 进行这种扁平化的通用解决方案。请帮助。
【问题讨论】:
标签: mule dataweave mule-component