title: Error resolving my dynamic json compared to hardcoded json in ng-options
body: <p>I have a listbox and I'm binding a list of item from a controller.</p>
  
  <pre><code>$scope.AvailableListItems = [
      [{Id:1,SupplierName: 'john.banks'},
      {Id: 2,SupplierName: 'jim.chevy'}, 
      {Id: 3,SupplierName: 'ralph.stocks'}]
  ];
  </code></pre>
  
  <p>This is hardcoded json. When I try this with below html it is working absolutely fine</p>
  
  <pre><code>&lt;select multiple id="availabelist" size="10" style="width:100%" ng-change="OnAvailableChange()" ng-model="SelectedAvailItems" ng-options="i as i.email for i in AvailableListItems[selectFaIndex]| filter:availablequery"&gt;&lt;/select&gt;
  </code></pre>
  
  <p>But, when I try to generate the same thing dynamically, then its not working at all. Getting a blank list box.
  Code is as below.</p>
  
  <pre><code> var getSuppliers = function () {  
              var tempArray = [];
              var lstsuppliers = CRUDService.getApiOutput(getSuppliersApiRoute);
              lstsuppliers.then(
                  function (response) {
                      debugger;
                      $scope.supplierList = response.data;
                      for (var i = 0; i &lt; $scope.supplierList.length; i++) {
                          arr = {};
                          arr["Id"] = $scope.supplierList[i].supplierId;
                          arr["SupplierName"] = $scope.supplierList[i].supplierName;
                          tempArray.push(arr);
                      }
                      $scope.AvailableListItems = tempArray;
                      console.log(JSON.stringify($scope.AvailableListItems));
                  },
                  function (error) {
                      console.log("Error: " + error);
                  });
  }
  </code></pre>
  
  <p>Please help me find the problem in my code.</p>
  
  <p><a href="https://plnkr.co/edit/0v3PTACCOh1J0kEm6AG5?p=preview" rel="nofollow noreferrer">Working Plunk link</a></p>
  
  <p>This is how my response data looks like: Updated based on Claies
  <a href="https://i.stack.imgur.com/g8GkP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g8GkP.png" alt="enter image description here"></a></p>
  
  <pre><code>[{"Id":1,"SupplierName":"ACECO PRECISION MANUFACTURING"},{"Id":2,"SupplierName":"Pentagon EMS Corporation"},{"Id":3,"SupplierName":"QUANTUMCLEAN"},{"Id":4,"SupplierName":"MODERN CERAMICS"},{"Id":5,"SupplierName":"NXEDGE INC"}]
  </code></pre>