I have the HTML with Angular below, that simply loops through each result and prints it:
<tr ng-repeat="transaction in transactions | filter:search">
<td>{{transaction.created}}</td>
<td><a href="#/transactions/{{transaction.id}}">{{transaction.type}}</a></td>
<td>{{transaction.amount}}</td>
</tr>
However, the database values of type are send, receive, buy, and sell. When it's displayed in the view, I want it to be as you could expect, a verb (sent, received, bought, sold).
How can I create a JavaScript array with key-value pairs of db value to display value, and display the value from that array where it matches the key (in Angular)?