I use a List_Service via REST API to read data from an external DB.
From there I get back and Object and not an Array.
We think because of this we always get undefinded when we map the data to an UI component.
Now I found in the forum some explanation about this and a possibel solution via using a Generic Security Context service.
We found this sample:
var yourObject = {
"converation1": {
name: "John",
tag: "good"
},
"converation2": {
name: "Mike",
tag: "better"
}
};
var newArray = [];
for (var i in yourObject) {
var currentObject = yourObject;
currentObject["iteration"] = i;
newArray.push(currentObject);
};
console.log(newArray);
How can we have in "yourObject" instead an object string like in the sample the real object comming via the list_service from the external database.