What do I do with nested data

0
Assuming my datasource is provided by a microflow which calls a Restful API and it returns a very deep nested object list, and I’m going to display it in a tree format widget. here’s my domain model, and import mapping is used in my microflow. A sample response will looks like this: [ { "label": "0-0", "key": "0-0", "children": [ { "label": "0-0-0", "key": "0-0-0", "children": [ { "label": "0-0-0-0", "key": "0-0-0-0" }, { "label": "0-0-0-1", "key": "0-0-0-1" }, { "label": "0-0-0-2", "key": "0-0-0-2" } ] }, { "label": "0-0-1", "key": "0-0-1", "children": [ { "label": "0-0-1-0", "key": "0-0-1-0" }, { "label": "0-0-1-1", "key": "0-0-1-1" }, { "label": "0-0-1-2", "key": "0-0-1-2" } ] }, { "label": "0-0-2", "key": "0-0-2" } ] }, { "label": "0-1", "key": "0-1", "children": [ { "label": "0-1-0-0", "key": "0-1-0-0" }, { "label": "0-1-0-1", "key": "0-1-0-1" }, { "label": "0-1-0-2", "key": "0-1-0-2" } ] }, { "label": "0-2", "key": "0-2" } ]   However, the best I’ve got so far is the first layer data’s attributes that are primitive types. Anything beyond primitive types like Object or List or Object List are hidden from my widgets. I’ve been told that there’re few mx.data functions in web runtime can do this, but I haven’t made it work.     Thus I can’t render my data recursively, I’m aware the alternative solution is converting nested data into a one dimension List in a microflow and tag parentId reference in each item, but it is anti-intuition to do when data is already prepared and inefficient to deal with a large dataset(CURD). My question can be roughly simplified into “How can I access object.a when object = {a: [{a:[]}], b: ‘1’} in my widget when my datasource, microflow and domain model is configured correctly.” Also, it’s really hard to finish a page construction when all my APIs are Restful, my team need to go through many difficulties like model building, data conversion(mapping or others) and data usage in pluggable widget(self-made).  
asked
0 answers