I am trying to order a list i'm showing in the front end. This is the json I am passing it from the my angular controller:
I am passing it an array filled with some amount of those arrays.
I want to order the list by the internalRanking, which I can make a string or int, but it will not always be the same length. I have tried looking online but I don't think I need to create a custom filter as it is iterating over an array containing some amount of the above array. My HTML is:
<form class="form-inline">
<input ng-model="query" type="text" placeholder="Filter by" autofocus>
</form>
<ul ng-repeat="rankingData in allRankingData | filter:query | orderBy:allRankingData[0].entries[0].internalRanking">
<li>{{index}}</li>
<li>{{rankingData[0].entries[0].playerOrTeamName}}</li>
<li>{{rankingData[0].tier}} {{rankingData[0].entries[0].division}} - {{rankingData[0].entries[0].leaguePoints}}LP</li>
<li>{{rankingData[0].entries[0].internalRanking}}</li>
</ul>
It just isn't ordering anything. The last list line of
{{rankingData[0].entries[0].internalRanking}}
is printing out the value fine, so that reference is correct.
Does anyone have any ideas? I can post more code if necessary
allRankingData[0].from yourorderBy.