title: Select element to show from an JSON array in an ng-model
body: <p>I have a JSON object that have (inside) an array of objects. I want to show one (the active one) in an input, and the others in a list of spans (or divs, or labels, don't care).</p>
  
  <p>The element looks like this:</p>
  
  <pre><code>[{
      name:"myName",
      age: "myAge",
      items:[
          {
              itemName:"someName1",
              itemIsActive:false
          },
          {
              itemName:"someName2",
              itemIsActive:true
          },
          {
              itemName:"someName3",
              itemIsActive:false
          },
      ]
  }]
  </code></pre>
  
  <p>The items array size is uncertain (can even be empty).</p>
  
  <p>And the result I'm trying to get is this one:</p>
  
  <pre><code>&lt;input type="text" ng-model="{{here goes the active one}}"&gt;
  
  &lt;span&gt;{{here goes the first that is not active}}&lt;/span&gt;
  &lt;span&gt;{{here goes the next that is not active}}&lt;/span&gt;
  &lt;span&gt;{{and so on}}&lt;/span&gt;
  </code></pre>
  
  <p>Thanks.</p>