My JSON structure is as shown in the image below: https://i.stack.imgur.com/5M6aC.png
This is my current approach:
createUIListElements(){
xml2js.parseString(this.xml, (err, result) => {
console.log(result);
this.uiListElement = result['cm:property-placeholder']['cm:default-properties'][0]['UIInput'][0]['UIListElement'][0]['UIElement'];
console.log(this.uiListElement);
this.uiListElementArray = this.uiListElement.map((element: { $: any;}) => element);
this.uiListElementArray.forEach((element: any) => {
console.log(element);
})
})
}
Currently, it only retrieves the data for UIListElement
. I am seeking assistance on how to display all the UIElement
data from both UIListElement
when using console.log(element)
.