title: ng-init with a second json array
body: <p>I am new to angular (currently using 1.4.6).
  I am using ng-repeat to iterate through an array of JSON objects. While iterating, I'd like to find a match in a second array, and display some information from both.
  Here is a simplified example:</p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="jsCtrl"&gt;
  customers: &lt;pre&gt;{{customers | json}}&lt;/pre&gt;
  cars: &lt;pre&gt;{{cars | json}}&lt;/pre&gt;
  
  &lt;div ng-repeat="customer in customers" ng-init="car = (cars | filter: {parentid : customer.id})"&gt;
      {{customer.id}}. {{customer.name}} |
      {{car.model}}
  &lt;/div&gt;
  
  &lt;/div&gt;
  
  var app = angular.module('myApp', []);
  app.controller('jsCtrl', function($scope) {
      $scope.customers = [{
          "id" :  1,
          "name" : "Alfreds Futterkiste",
          "city" : "Berlin",
          "country" : "Germany"
      },
      {
          "id" :  2,
          "name" : "Steve",
          "city" : "Chicago",
          "country" : "USA"
      }];
  
      $scope.cars = [{
          "parentid" : 2,
          "make" : "Ford",
          "model" : "Probe",
          "year" : "1990"
      },
      {
          "parentid" : 1,
          "make" : "Acura",
          "model" : "RSX",
          "year" : "2003"
      }];
  });
  </code></pre>
  
  <p>Jsfiddle link:
  <a href="https://jsfiddle.net/namyzarc/tc0dc5sL/3/" rel="nofollow noreferrer">https://jsfiddle.net/namyzarc/tc0dc5sL/3/</a></p>
  
  <p>What am I doing wrong?</p>