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 has been archived by the owner on Jan 7, 2021. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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?The text was updated successfully, but these errors were encountered: