title: How do I set the value property in AngularJS' ng-options?
body: <p>Here is what seems to be bothering a lot of people (including me).</p>
  
  <p>When using the <code>ng-options</code> directive in AngularJS to fill in the options for a <code>&lt;select&gt;</code> tag, I cannot figure out how to set the value for an option. The documentation for this is really unclear - at least for a simpleton like me.</p>
  
  <p>I can set the text for an option easily like so:</p>
  
  <pre><code>ng-options="select p.text for p in resultOptions"
  </code></pre>
  
  <p>When <code>resultOptions</code> is for example:</p>
  
  <pre><code>[
      {
          "value": 1,
          "text": "1st"
      },
      {
          "value": 2,
          "text": "2nd"
      }
  ]
  </code></pre>
  
  <p>It should be (and probably is) the most simple thing to set the option values, but so far I just don't get it.</p>