Convert XML response to JSON

How can I convert an XML response of a service to a JSON in Javascript? Anyone can help me :upside_down_face::raised_hands:



You could try function from this post, it might work for you.

I get this error:
TypeError: xml.hasChildNodes is not a function

That’s an error you need to solve yourself.
The general approach suggested still stands - you need to find a lightweight JavaScript XML parser.