The core problem is that you need an array of objects that represent one row each, meaning you want test to look something like this:
$scope.test = [
{ test: 'blah' },
{ test: 'blah2' }
];
To do that programmatically, you could do something like this:
$scope.test = [ 'blah', 'blah2' ];
$scope.testObjects = [];
$scope.test.forEach( function( val ){
$scope.testObjects.push( { test: val } );
});
$scope.gridOptions = {
data: 'testObjects',
columnDefs: [
{field: 'test', displayName: 'Test'},
]
};
which gets rid of your need for a filter. See my revised plunker.