Is there a way to specify how empty tags are formatted when xml is converted to JSON? #150
colin-luke
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a situation where the XML I want to convert looks something like this:
When I call
const obj = convert(xml, {format:"object"})
the JSON is generated like this:Is there a way to configure the convert function such that the empty element (the elem2 element in the first object of the array) produces an empty string or null instead of an empty object? What I'd like is something like this:
Beta Was this translation helpful? Give feedback.
All reactions