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

Array Mapping #12

Open
predic8 opened this issue May 19, 2014 · 3 comments
Open

Array Mapping #12

predic8 opened this issue May 19, 2014 · 3 comments

Comments

@predic8
Copy link

predic8 commented May 19, 2014

The script:

var o2 = {
  foo : [1, 2, 3]
};

console.log(json2xml(o2 ));

produces:

<foo>123</foo>

Arrays should be mapped to a sequence like:

<foo>
  <item>1</item>
  <item>2</item>
  <item>3</item>
</foo>

or

<foo>1 2 3</foo>
@ghost
Copy link

ghost commented Mar 10, 2015

👍

@estheban
Copy link
Owner

Behaviour: If a sequential array is provided, convert it into an associated array of
['item': 1, 'item': 2, 'item': 3]

@iqianxing
Copy link
Contributor

I fixed this bug perhaps: #24

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

3 participants