title: How to retrieve certain index in an array from an Angular ng-repeat Directive?
body: <p>I want to get a specific index in an array from an ng-repeat directive.</p>
  
  <p>Now it is printing out the info of all indexes... I just one to print the info  on the second index one for example...</p>
  
  <p>This is my main.js:</p>
  
  <pre><code>  app.controller('ProviderController', ['$http', '$scope', function($http, $scope) {
        var provider = this;
  
      //Get service from API
        $http({
          url: 'http://private-5d90c-kevinhiller.apiary-mock.com/angular_challenge/horror_movies',
          method: "GET",
        }).success(function(data) {
          //process received Data with the processMovie function
           var providers = processMovies(data);
          //process Data with the calculatePercentage function
           var percentages = calculatePercentage(providers, data.length);
  
  
           var providerKeys = [];
           for(key in providers) {
            providerKeys.push(key);
           }
           $scope.providerKeys = providerKeys;
           $scope.providers = providers;
           $scope.percentages = percentages;
        })
    }]);
  
  
    function processMovies(data) {
  
      var providers = [],
        movie,
        offer;
      var total = data.length;
  
      for(var i = 0; i &lt; data.length; i++) {
        movie = data[i];
        var movie_id = movie.id;
        for(var j = 0; j &lt; movie.offers.length; j++) {
          offer = movie.offers[j];
          //check if provider_id doesnt exist
          if (typeof providers[offer.provider_id] === 'undefined') {
              providers[offer.provider_id] = {};
              providers[offer.provider_id][movie_id] = movie;
          } else {
              if(!providers[offer.provider_id].hasOwnProperty(movie_id)) {
                providers[offer.provider_id][movie_id] = movie;
  
              }   
          }
  
        }  
  
      }
      return providers;
    }
  </code></pre>
  
  <p>My Html:</p>
  
  <pre><code>               &lt;div ng-controller="ProviderController as provider"&gt;
                  &lt;!-- Include provider controller from Angular--&gt;      
                  &lt;div  ng-repeat="providerId in providerKeys"&gt;
                      &lt;ul&gt;
                          &lt;li&gt;Provider {{providerId}}: {{percentages[providerId]|number :0 }}%
  
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
                  &lt;div ng-repeat="(provider_id, value) in providers track by $index"&gt;
                      &lt;div ng-repeat="movie in value"&gt;
                          &lt;p&gt;{{movie.title}} Belongs to provider number: {{provider_id}}&lt;/p&gt;&lt;br&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;  
  </code></pre>
  
  <p>As a result i get all movies from all proviers.. how do I say in the Angular directive to just get the ones from provider 2 for example ?
  Thanks!</p>