title: Bind ng-options to nested array within JSON object, within ng-repeat
body: <p>This is my first question, so please be gentle on me! I hope you can help.</p>
  
  <p>I am trying to define a select box (dropdown) within my HTML view using ng-repeat, so that I can create a select for each item in an array. I have successfully achieved this, but my problems come when I try to get the options I need into each of the selects.</p>
  
  <p>The array I am using<code>{
      "field1": 1,
      "field2": "Value01",
      "field3": "Value02",
      "refFields": [
        {
          "fieldId": 100,
          "fieldValue": "fieldValueA"
        },
        {
          "fieldId": 101,
          "fieldValue": "fieldValueB"
        }
      ]
    }, etc...</code></p>
  
  <p>I need a select per item in the 'top level' of the array, and in each select box the values that should appear should be the fieldValue from the refFields nested array.</p>
  
  <p>My current (broken) code products some pretty rubbish results.
  Here's the code:</p>
  
  <pre><code>&lt;div ng-repeat="fk in fks"&gt;
          &lt;ng-form name="fksForm"&gt;
              &lt;select name="fkselect" ng-model="fk" ng-options="item as item.refFields for item in fks"&gt;                
              &lt;/select&gt;
          &lt;/ng-form&gt;
      &lt;/div&gt;  
  </code></pre>
  
  <p>Could anybody provide me with some insight into whether this is possible? I don't think that flattening the data is an option for this particular application. I've tried quite a few different things including passing an index to the ng-options, which as you might expect produced some pretty dodgy results. I also tried this, which doesn't give me any useful output.</p>
  
  <pre><code>ng-options="item as item.refFields.fieldValue for item in fks"
  </code></pre>
  
  <p>Here's my JSFiddle: <a href="https://jsfiddle.net/blackberry464/d50qq4c3/2/" rel="nofollow">ng-option nested JSON Array within ng-repeat</a></p>
  
  <p>Many thanks in advance for any suggestions!</p>