I am utilizing ng-repeat to loop through a key/value array. In cases where the key matches 'First Name', I want to bind it to firstName. Being new to angular.js, I wonder if there is a more efficient way of achieving this? Essentially, I have a key/value array and I need to perform specific actions on certain keys within it.
<ul id="customers" infinite-scroll='loadMoreUsers()'>
<li ng-repeat="user in users" data-customer-id="{{user.Id}}">
<h4>{{user.firstName}} {{user.lastName}}</h4>
<div ng-repeat="(key, value) in user.AttributeBag">
<span ng-if="key == 'First Name'">{{user.firstName = value}}</span>
<span ng-if="key == 'Last Name'">{{user.lastName = value}}</span></span>
<span ng-if="key != 'First Name' && key != 'Last Name'">{{key}} : {{value}}</span>
</div>
</li>
</ul>