title: Using ng-options syntax with object index instead of object name
body: <p>I am using Angular 1 and have been trying to display the drop down list values using ng-options directive and the only one that could work for me is :   </p>
  
  <pre><code>&lt;selectdata-ng-options="key as value for (key,value) in JSON.ObjectName.ListValues"&gt;&lt;/select&gt; 
  </code></pre>
  
  <p>Because of the way my JSON is generated, I will need to display any number of the drop downs iteratively. So the only way to make the above syntax work is to assign an index based value Example: <strong>index[0]</strong> in place of the <strong>ListValues</strong> . Something like this:</p>
  
  <pre><code>&lt;select data-ng-options="key as value for (key,value) in JSON.ObjectName.index[0]"&gt;
  </code></pre>
  
  <p>My JSON Object is of the format:</p>
  
  <pre><code>{
      "JSON": {
          "ObjectName": {
              "ItemValues": {
                  "0000": "County",
                  "0100": "City",
                  "0200": "State",
                  "0300": "Region",
                  "0400": "Country"
              },
              "AreaValues": {
                  "1111": "Metro",
                  "11AA": "Subway",
                  "2222": "Bus"
                  "22BB": "Transit"
              }
          }
      }
  }
  </code></pre>
  
  <p>I have tried assigning the JSON to a scope object in my controller and was trying to display on my page, but if i were to do this for any number of drop downs, that approach wouldn't work efficiently.</p>
  
  <p>My only other option is to do this using the JSON index  </p>
  
  <p>Would this approach work?<br>
  Should I be using custom directives?<br>
  Is there a better way of tackling this issue ?</p>