GOAL : Setup a table that is sortable after data is returned from our server.
Data Format Returned from server :
{
"result" : {
"code" : "OK",
"msg" : ""
},
"data" : [{
"row" : ["Fred", "64233", "197"]
}, {
"row" : ["Steve", "158879", "36"]
}, {
"row" : ["Ted", "115222", "12"]
}
]
}
Limitation : Can't change the data format the server returns. The data that I want sortable is contained in the array in the "row" object. I tried doing things like
<tr ng-repeat="roll in myWelcome.data" | orderBy:'roll.row[1]'">
<td>{{ roll.row[0] }}</td><td>{{ roll.row[1] }}</td><td>{{ roll.row[2] }}</td>
</tr>
but it didn't work. Any ideas?