I have map(Bidirectional) of States. Which composed of stateName and stateCode. It is populated by following HTML code but cannot filter by stateCode or stateName in ascending order.
<div class="col-sm-2">
<select ng-model="location.stateCode" ng-change="loadDistricts();" ng-options="stateName for (stateCode, stateName) in stateOptions | orderBy:'stateCode'" class="form-control" id="state"></select>
</div>
//Json Object
stateOptions = {'MH':'Maharashtra','GJ':'Gujarat','MP':'Madhya Pradesh'};
stateCodeyou should havefor (stateCode, stateName)instead offor (stateName, stateCode)