node-json2xml
node-json2xml copied to clipboard
Array Mapping
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>
:+1:
Behaviour: If a sequential array is provided, convert it into an associated array of ['item': 1, 'item': 2, 'item': 3]
I fixed this bug perhaps: https://github.com/estheban/node-json2xml/pull/24