title: Bind data in json to a select box in AngularJs
body: <p>I am looking for a way to bind data from a multidimensional array in the scope with my view.</p>
  
  <p>This is the service:</p>
  
  <pre><code>sampleApp.factory('ApplicationsService', function ($http, $q) {
      return {
          save: function () { alert(app_url);
              var deferred = $q.defer();
              $http.get(app_url+'application-definition/',
               { headers: { 'Accept': 'application/json', 'Authorization': $.session.get("loginToken") } })
                  .success(function (data) { if(data.options=="") { 
                  alert("No Budget Option.");
                  } else {
                  $q.applicationOptions = data;
                  var arr = $q.applicationOptions.definitions;
                  arr.forEach(function(val){ alert(val.name); });
                  // $q.options.push.apply($q.options, data.options);
                  // $q.services.forEach(function(entry){
                      // alert(entry);
                  //});
                  deferred.resolve(); } })
                  .error(function (err) { alert("error"); deferred.reject(); });
              return deferred.promise; 
          }
      };
  });
  </code></pre>
  
  <p>This is the result in the form of json.</p>
  
  <pre><code>{
      "definitions": [
          {
              "name": "",
              "technologies": [],
              "expectedTraffic": 0,
              "securityPosture": null,
              "dataSensitivity": "PCI",
              "impactCostDuringHours": 0,
              "impactCostOutsideHours": 0,
              "maximumTolerableOutage": 0,
              "maintenanceWindow": "",
              "_id": "533527b16ce785d6138b524f",
              "organisationId": "532fe5db6ce785ce378b4bb5",
              "created": "Fri, 28 Mar 14 18:41:37 +1100",
              "updated": "Fri, 28 Mar 14 18:41:37 +1100",
              "deleted": false
          },
          {
              "name": "PCII",
              "technologies": [],
              "expectedTraffic": 0,
              "securityPosture": null,
              "dataSensitivity": null,
              "impactCostDuringHours": 0,
              "impactCostOutsideHours": 0,
              "maximumTolerableOutage": 0,
              "maintenanceWindow": "",
              "_id": "53352b5d6ce785d6138b52c6",
              "organisationId": "532fe5db6ce785ce378b4bb5",
              "created": "Fri, 28 Mar 14 18:57:17 +1100",
              "updated": "Fri, 28 Mar 14 18:57:17 +1100",
              "deleted": false
          },
          {
              "name": "PCII",
              "technologies": [],
              "expectedTraffic": 0,
              "securityPosture": null,
              "dataSensitivity": null,
              "impactCostDuringHours": 0,
              "impactCostOutsideHours": 0,
              "maximumTolerableOutage": 0,
              "maintenanceWindow": "",
              "_id": "53354f2e6ce785d6138b53c3",
              "organisationId": "532fe5db6ce785ce378b4bb5",
              "created": "Fri, 28 Mar 14 21:30:06 +1100",
              "updated": "Fri, 28 Mar 14 21:30:06 +1100",
              "deleted": false
          },
          {
              "name": "Test Application Definition 2",
              "technologies": [
                  "MySQL",
                  "PHP"
              ],
              "expectedTraffic": 1,
              "securityPosture": "Low",
              "dataSensitivity": "PCI",
              "impactCostDuringHours": 1,
              "impactCostOutsideHours": 1,
              "maximumTolerableOutage": 1,
              "maintenanceWindow": "Business or After Hours",
              "_id": "533a8a496ce785ce378b5190",
              "organisationId": "532fe5db6ce785ce378b4bb5",
              "created": "Tue, 01 Apr 14 20:43:37 +1100",
              "updated": "Tue, 01 Apr 14 20:43:37 +1100",
              "deleted": false
          }]
  }
  </code></pre>
  
  <p>I want to bind this with a select box. The code I used is:</p>
  
  <pre><code>&lt;select class="form-control" id="select-01new" data-ng-options="act in applicationOptions.name"&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>This is not working. How can I bind data with the select box.</p>