-
Couldn't load subscription status.
- Fork 80
Closed
Labels
Milestone
Description
I am getting the API response as following XML,
<a> <b ID="0"> <c>10020</c> <d>NEWYORK</d> <e>NY</e> </b> <b ID="1"> <c>06373</c> <d>OLDLYME</d> <e>CT</e> </b> </a>
I want to convert the above xml to json as follows,
{ "b": [ { "c": "10020", "d": "NEWYORK", "e": "NY" }, { "c": "06373", "d": "OLDLYME", "e": "CT" } ] }
I have already tried U.xmlToJson(), U.fromXmlWithoutAttributes() but unable to achieve the above expected result.(Skip the root element <a> and also skip xml element attributes("ID") ). Please let me know will this achieved by using Underscore-lib?