-
Notifications
You must be signed in to change notification settings - Fork 38
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
Handling array items #31
Comments
In fact it is a nice to have because I can quickly solve it outside of the jsontoxml lib.
|
in my case i want to embed array items without array key .. for example
just without the array key
|
Hi @jlguenego: Just run into this issue today, until I realized from the example in readme that all that's needed is a new object with name and children properties: let jsonObject = JSON.parse('{"content": [ ... ]}')
let arrayObject = {}
arrayObject.content = jsonObject.content.map(o => Object.assign({name: 'item', children: o})
jsontoxml(arrayObject) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to convert the following json into xml:
The output does not satisfy because it does not clearly sepearate the array items:
I would suggest to add in the options something like:
handleArrayElement: true
that would produce:
The text was updated successfully, but these errors were encountered: