Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Problem in conversion from XML to JSON #11

Open
sudhakar-sekar opened this issue Aug 16, 2018 · 1 comment
Open

Problem in conversion from XML to JSON #11

sudhakar-sekar opened this issue Aug 16, 2018 · 1 comment

Comments

@sudhakar-sekar
Copy link

Hi,
I am using v0.2.0, still I am facing the above issue. Can you please help me to resolve these issue, I am struggling?

<data></data>
<data></data>
<data></data>

When i am converting from XML to JSON, I am getting:

"data": {
     0: { },
     1: { },
     2: { }
}

Can you help me, to convert correct JSON format Array.

"data": [
     0: { },
     1: { },
     2: { }
]

Thanks,
Sudhakar.

@dhwaneetbhatt
Copy link

@sudhakar-sekar I know this post is very old but I recommend you to try the other well maintained package - https://github.com/Leonidas-from-XIV/node-xml2js, this library also uses it as a dependency.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants