title: ng-repeat: access key and value for each object in array of objects
body: <p>I have an array of objects and I am using an <code>ng-repeat</code> to iterate over them, which is easy.  The array looks something like this:</p>
  
  <pre><code>$scope.steps = [
      {companyName: true},
      {businessType: true},
      {physicalAddress: true}
  ];
  </code></pre>
  
  <p>And my <code>ng-repeat</code> attribute looks like:</p>
  
  <pre><code>&lt;div ng-repeat="step in steps"&gt; ... &lt;/div&gt;
  </code></pre>
  
  <p>In each iteration, <code>step</code> is equal to one of the objects, as expected.  Is there anyway to access both the key and the value of the <code>step</code> object?  So that I could do something like this:</p>
  
  <pre><code>&lt;div ng-repeat="(stepName, isComplete) in steps"&gt; ... &lt;/div&gt;
  </code></pre>
  
  <p>Where <code>stepName</code> == <code>'companyName'</code> and <code>isComplete</code> == <code>true</code>.  I've tried doing this exact thing but <code>stepName</code> always just ends up being the index of the step object (which makes sense).  I'm just trying to figure out if there is another way to write the <code>ng-repeat</code> syntax so that I can get the key and the value.</p>
  
  <p>Thanks for any ideas/suggestions.  Much appreciated.</p>
  
  <p>PS.  My current work around is to just do this in my controller:</p>
  
  <pre><code>$scope.stepNames = [];
  angular.forEach($scope.steps, function(isComplete, stepName){
       $scope.stepNames.push({stepName: stepName, isComplete: isComplete});
  });
  </code></pre>
  
  <p>And then to iterate over that, but it would be nice to do it all in the view</p>