title: Binding nested objects with a string key
body: <p>I have a project that generates forms based on the data that is passed in.</p>
  
  <p>We support may field types but, for example, here is the <code>input</code> template:</p>
  
  <pre><code>&lt;label&gt;
      {{fieldSchema.label}}
      &lt;input type="{{fieldSchema.attributes.type}}"
             name="{{fieldSchema.attributes.name}}"
             ng-model="model[ fieldSchema.attributes.name ]" /&gt;
  &lt;/label&gt;
  </code></pre>
  
  <p>This works great for flat models, however if the model is nested, it falls apart, eg:</p>
  
  <pre><code>$scope.model = {
      manager: {
          first_name: 'John'
      }
  }
  $scope.fieldSchema.attributes.name = 'manager.first_name';
  </code></pre>
  
  <p>Is there a way to use <code>$parse</code> or <code>$interpolate</code> or something similar within the <code>ng-model</code>? I've seen examples on how to <em>fetch</em> data in this structure, but I haven't been able to find a two-way binding solution.</p>
  
  <p>(Note: Using angular version 1.5.0)</p>
  
  <p><strong>Edit:</strong> Here is a plunk, hopefully this makes it more clear.  <a href="http://plnkr.co/edit/4E8jlsnuy5HkCZPxSf5z?p=preview" rel="nofollow">http://plnkr.co/edit/4E8jlsnuy5HkCZPxSf5z?p=preview</a></p>