Skip to content
Advertisement

JSON to XML Using Javascript

I am trying to convert the JSON to XML but not getting exact output.In My JSON having array object it not converting that to XML array.Mainly array object is not converting into XML as expected

JavaScript

Actual Output:

JavaScript

Expected Output:

JavaScript

Please guide me if i am missing anything from the code to get my expected result

Advertisement

Answer

replace your OBJtoXML function with

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement