Closed mraak closed 4 years ago
It seems this is not a bug, it is just an misunderstanding of the API I guess, you should provide the root element name at the first argument of the parse function and after that you should provide the actual object.
Can you please try this:
const imsDataXml = js2xmlparser.parse('imsData', imsData);
// or
const rootElement = Object.keys(imsData)[0];
const imsDataXml = js2xmlparser.parse(rootElement, imsData[rootElement]);
What could possibly be wrong here? I'm using it in Node environment.
And the output