I need to loop trough object of users but I want to place a concrete user (me) at the beginning.
Example
this.users = [
{
id: 1,
name: "Jane"
},
{
id: 2,
name: "John"
},
{
id: 3,
name: "Me"
},
{
id: 4,
name: "Mark"
}
];
<div ng-repeat="user in ctrl.users">
<!-- SOME OTHER TAGS -->
</div>
And I want it to be this
<div>
<!-- ME -->
</div>
<div>
<!-- JANE -->
</div>
<div>
<!-- JOHN -->
</div>
<div>
<!-- MARK -->
</div>
Is it posible to do it using orderBy
or do I have to reorganize my array of users ?