I am using xml2js to parse xml in my Aguilar CLI 9 project and wondering how to get the root node obj if the name is unknown (varies) on request. For example the following query syntax works to get the root node obj and attribute value:
result.Home.$.Name;
However, on request I will not if root will be Home, Foo, etc. I tried the following, but did not work:
result[0].$.Name;
result.root.$.Name;
Also, I am very new to Angular and Typescript can anyone point me to some good documentation on what query syntax is being used? Not sure if that is xml2js, typescript, of js specific. I am use to using xpath to query so this is a lot different.
Thanks in advance!