Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return parsed object instead of string ? #210

Open
vulkanosaure opened this issue Feb 14, 2024 · 1 comment
Open

return parsed object instead of string ? #210

vulkanosaure opened this issue Feb 14, 2024 · 1 comment

Comments

@vulkanosaure
Copy link

Hi,

Thanks for the library, it works great.

I was just wondering if there's any way to receive an object (non stringified) rather than a string, i didn't find anything in the doc about that.
Of course i can call parse myself, but it's a waste because i imagine you must have it as an object and then call stringify on it ? (unless i'm wrong on that point and you directly construct it as a string, in which case never mind)

@pepkin88
Copy link

pepkin88 commented May 4, 2024

From docs:

...
result = convert.xml2js(xml, options);    // to convert xml text to javascript object
result = convert.xml2json(xml, options);  // to convert xml text to json text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants