1

The NPM package xml2js has the explicitArray option which only puts nodes into an array if there is more than one of them. Sometimes I have XML which only has one instance of a node but I need it in an array. Is there a way to specify a list of node names which should always be placed into an array?

strattonn
  • 1,790
  • 2
  • 22
  • 41

1 Answers1

1

Issue #216 "Known array values" addresses this question. The author doesn't want to handle this.

strattonn
  • 1,790
  • 2
  • 22
  • 41