I'm calling an oData v2 service with an $expand parameter so the url looks like this:
https://host/odata/v2/myEntity?$expand=key4
and I am returned an oData json object which looks like this:
{
"d": {
"results": [
{
"key1": "val1",
"key2": "val2",
"key3": "val3",
"key4": {
"results": [
{
"key5": "val5",
"key6": "val6",
"key7": "val7"
}
]
}
}
]
}
}
Once I receive the oData object, in my controller.js I create a JSONModel object like so and assign it to the viewModel:
var oJson = new sap.ui.model.json.JSONModel(oData);
this.getView().byId("tableId").setModel(oJson, "myModel");
Next, in my View.xml I have a table with the id "tableId" which binds this myModel as so:
<Table id="tableId" items="{path: 'myModel>/results' }">
With the above I am able to retrieve the values for key1, key2 and key3 in the table by doing:
<Text text="{myModel>key1}" />
But I cannot get the values for the results array under key4 to access key5, key6 and key7. How do I achieve this please?