I'm using a Logic App to Convert a JSON file to XML.
After the conversion I want to manipulate some of the XML elements to include certain text. Please see below code examples. Is this possible to achieve inside the logic app? Or do I need to manipulate the JSON before converting?
Pre conversion:
{
"IDRecord": [
{
"EmployeeLastName": "Doe",
"EmployeeFirstName": "John",
"EmployeeUserid": "JD",
"SomeField": "Test"
}
]
}
After conversion (Root element ID is created by converting function):
<ID>
<IDRecord>
<EmployeeLastName>Doe</EmployeeLastName>
<EmployeeFirstName>John</EmployeeFirstName>
<EmployeeUserid>JD</EmployeeUserid>
<SomeField>Test</SomeField>
</IDRecord>
</ID>
What I want to achieve:
<ID xmlns="someUrl">
<IDRecord xmlns="">
<EmployeeLastName>Doe</EmployeeLastName>
<EmployeeFirstName>John</EmployeeFirstName>
<EmployeeUserid>JD</EmployeeUserid>
<SomeField>Test</SomeField>
</IDRecord>
</ID>
Any help is appreciated! Thanks