I m trying to use the node.js module xml2js
My code is quite simple:
function testparse(pathname, callback) {
var parser = require(\'xml2js\').Pa
As xml2js' documentation states, you can configure the parser to not abuse of arrays, by setting the property explicitArray
to false
(important: it has to be a boolean value as the string "false"
will just not work!)
Example:
var parser = new xml2js.Parser({explicitArray : false});
This way, you should be able to access your JSON properties in a much easier way. I hope this helps anyone.