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

ResultS of complicated content are wrong #39

Open
yihchu opened this issue Mar 16, 2018 · 1 comment
Open

ResultS of complicated content are wrong #39

yihchu opened this issue Mar 16, 2018 · 1 comment

Comments

@yihchu
Copy link

yihchu commented Mar 16, 2018

I ran this,

let example3 = { annotation: {xxx: '1111', arr: [ { toy: 'Transformers' } , { toy: 'GI Joe' }, { toy: 'He-man' } ]} };
let result1 = xml(example3, {indent: '\t'})

and the result1 was:
'<annotation/>'

@maxmarkus
Copy link

Long time ago, but in case someone passes by. You're just using it wrong, written properly it works:

{ annotation: [
  {xxx: '1111'},
  {arr: [ 
    { toy: 'Transformers' },
    { toy: 'GI Joe' },
    { toy: 'He-man' }
  ]}
]}

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