I am trying to sort the dictionary in angular JS. Below is my code
<table ng-if='dedup==false' class="table table-hover table-striped" >
<th>Name</th>
<th class="value">Count</th>
<tr ng-repeat="(key,value) in result.Fields[0].FieldDistributions|orderBy:value:reverse ">
<td>{{key}}</td>
<td> {{value|number}}</td>
</tr>
</table>
I want to sort the table based on the value .
What went wrong in the code. Can any one help me ?
UPDATE :
{"Fields":[{"FieldName":"Employer","FieldDistributions":{"na":"30724","UK Civil Service":"561","National Health Service":"523","Compass Group":"496","Cit Group Limited":"491","Webrecruit Ltd":"266","Med Team Primary Care Services Limited":"135","Johnson & Johnson":"124","The Allstars Group":"95","Pj Carey Contractors Limited":"88"}}]}
This is my response
Thanks,