You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 7, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 7, 2021. It is now read-only.
documentation for arrayNotation individual fields #189
Hi, the documentation says that you may specify the array notation on a per field basis, but does not describe how that is done? Can you please provide that info?
It mentions: arrayNotation: XML child nodes are always treated as arrays NB: you can specify a selective array of nodes for this to apply to instead of the whole document., however this is not true. A child node with a single element is returned as an object. How could i force this individual field to always return as an array even if only a single element exists within?
I was also looking for documentation on this but couln't find it. However, in the tests you can see an example: var result = parser.toJson(xml, {arrayNotation: ['drivers', 'vehicles']});
You can just specify the "always array" fiedlds as array.
Activity
aquu commentedon Mar 10, 2020
I was also looking for documentation on this but couln't find it. However, in the tests you can see an example:
var result = parser.toJson(xml, {arrayNotation: ['drivers', 'vehicles']});You can just specify the "always array" fiedlds as array.