The orderBy child of element option in angularJS is not working. I want to order by "pos" child. Thanks
$scope.commands = {
"xyz" : {
"group":"g2",
"pos":2
},
"abc" : {
"group":"g2",
"pos":3
},
"ijk" : {
"group":"g1",
"pos":1
}
};
<div ng-repeat="(key, data) in commands | orderBy:'data.pos'">{{data.pos}} - {{key}}</div>