on 07-23-2018 1:47 PM
Dear Experts,
I am having issue in Converting XML to JSON.
The format expected by Customer. Please let me know know how I can achieve it using Content modifier or Script.
I did some settings and got only first node of Customer and not able to get second and Subsequent nodes.
Please advise to fix the issue. The content Modifier screen shot is added in the attachmeny
Requested Output:
{
"name":"Lead time request Project",
"salesOrganisationName":"1000",
"number":"94895",
"Customers":[
{
"Country":"IN",
"HouseNumber":"3",
"Number":"100003535",
"PostalCode":"M3 2HW",
"Street":"Parsonage",
"CustomerType":"Installer",
"Name":"Adam Mcloughlin"
},
{
"Country":"LX",
"HouseNumber":"3",
"Number":"100003535",
"PostalCode":"M3 2HW",
"Street":"Parsonage",
"CustomerType":"Dealer",
"Name":"Adam Mcloughlin"
}
]
}
The Content Modifier Body I have user as below:
{
"name":"${property.name}",
"salesOrganisationName":"${property.salesOrganisationName}",
"number":"${property.number}",
"Customers":[
{
"Country":"${property.Country}",
"HouseNumber":"${property.HouseNumber}",
"Number":"${property.Number}",
"PostalCode":"${property.PostalCode}",
"Street":"${property.Street}",
"CustomerType":"${property.CustomerType}",
"Name":"${property.Name}"
}
]
}
After formatting with the above logic the the Output I received.
{
"name":"Lead time request Project",
"salesOrganisationName":"1000",
"number":"94895",
"Customers":[
{
"Country":"IN",
"HouseNumber":"3",
"Number":"100003535",
"PostalCode":"M32HW",
"Street":"Parsonage",
"CustomerType":"Installer",
"Name":"Adam Mcloughlin"
}
]
}
Thanks & Regards
capture.pngVijay S B
Hi Vijay,
I am having same requirement. Can you share the details how you acheived it.
Regards,
Aswini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.