Given the input XML as
<Employee> <Name>Adam</Name> <Ids> <Id>123</Id> <Id>456</Id> </Ids> <Country>US</Country> </Employee>
XML to JSON policy correctly converts it into JSON as below-
{ "Employee": { "Name": "Adam", "Ids": { "Id": [ "123", "456" ] }, "Country": "US" } }
But - Is there a configuration available in this policy to get the output JSON as below ?
{ "Employee":{ "Name":"Adam", "Ids":[ { "Id":"123" }, { "Id":"456" } ], "Country":"US" } }
Thanks!
Unfortunately I don't believe there is such an option. Your best bet is probably to write a short JS callout to convert the Id array to the format you need.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |