I am trying to have a search box search values in a table. My code currently works fine.
<tr ng-repeat="b in bugs | filter:searchText">
However, I wish to go further and give users the ability to search specific columns if they have a colon in their search text (e.g. "id: 3").
I have managed to split the search text, separating the column name from the field text.
I read in AngularJS you can do searchText.id to filter specific columns. However, my table has quite a few columns and I only have a string of the column name.
My question is, what is the best way to dynamically set the column being filtered?