Q:

Filter certain column with ng-repeat

I try to filter an array of objects using ng-repeat on a specific key or you might even call it column.
The key/column on which the filter should be applied on, comes from an selectbox.
data-ng-model="selectedValue" // -> item.name

The term which should be searched for comes from an input field and is decalred as following:
<input type="text" data-ng-model="q">

<div data-ng-repeat="item in items |filter:{selectBoxValue:q}">{{item.name}}</div> 

The above does not work, sadly.
But when I use item.name instat of selectBoxValue in my filter, it works great.

A:

In your controller: 
$scope.search = {}
In your markup 
<input ng-model="colName"> //colName
<input ng-model="search[colName]"> //colvalue
<div data-ng-repeat="item in items |filter:search">{{item.name}}</div> 

