title: How to create dictionary like model binding in AngularJS
body: <p>On my page I have dynamically generated input tags from database. Those fields could look like that:</p>
  
  <pre><code>&lt;input id='customField-Street' type='text' /&gt;
  &lt;input id='customField-Height' type='text' /&gt;
  &lt;input id='customField-IsBlack' type="checkbox" /&gt;
  &lt;select id='customField-Car'&gt;
      &lt;option value="volvo"&gt;Volvo&lt;/option&gt;
      &lt;option value="saab"&gt;Saab&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I need to find a way to set a model binding in following key-value format:</p>
  
  <pre><code>$scope.customFieldsDictionary = [{ 
      "Key": "customField-Street",
      "Value": "SomeStreet"
  }, {
      "Key": "customField-Height",
      "Value": "125"
  }, {
      "Key": "customField-IsBlack",
      "Value": "true"
  }, {
      "Key": "customField-Car",
      "Value": "volvo"
  }];
  </code></pre>
  
  <p>I need to have key-value format since my service accept custom data in that format.</p>
  
  <p><strong>Question</strong>:
  How to set AngularJS two way binding between input fields and <code>$scope.customFieldsDictionary</code> field in specified dictionary like format. </p>