If I have array of object in such a way.
data[0].name= 'Prashant Shukla';
$scope.getColumn[i].Field = 'name';
Using above I want to assign Prashant
in $scope.getColumn[i].value
in dynamic way. I have try like this
$scope.getColumn[i].value = data[0].+$scope.getColumn[i].Field;
but this give me Uncaught SyntaxError: Unexpected token +
I can get Prashant Shukla
by data[0].name
but How can I get exactly same by using $scope.getColumn[i].Field
in place of name
index ?
how can I resolve this error and assign value dynamically?
thanks ahead.