After receiving the data structure array from an API, I am faced with the task of displaying nested array properties for each record. Here is the approach I am currently taking:
$scope.gridOptions = {};
$scope.gridOptions.columnDefs = [];
$scope.gridOptions.data = data.data;
$scope.load = function (param) {
lovServices.events(param)
.then(function(response) {
var events = response.events;
for (var i = 0; i < events.length; i++) {
console.log(events[i].eventProperties)
$scope.gridOptions.data = events[i].eventProperties
}
})
}
});
The
console.log(events[i].eventProperties)
correctly displays the dataset, but the grid remains empty. Could someone kindly point out where my mistake might be? Thank you in advance.