title: Is there a way to change the key of object dynamically using ng-repeat
body: <p>My json object looks like this,</p>
  
  <pre><code>$scope.myObject = {
                    "mainKey1":{
                       "name": "x",
                       "age": "20"
                     },
                    "mainKey2":{
                       "name":"y",
                       "age":"25"
                     },
                    "mainKey3":{
                        name:"z",
                        "age":"30"
                     }
                   };
  </code></pre>
  
  <p>and i want to change <strong>keys</strong> for example ,
     i want to change <code>"mainKey1"</code> to <code>"newKey1</code>" in <code>ng-repeat</code></p>
  
  <p><strong>my html looks like this</strong></p>
  
  <pre><code>&lt;div ng-repeat="(key,obj) in myObject"&gt;
    &lt;label&gt;Name&lt;/label&gt;
    &lt;input type="text" name="name" ng-model="obj.name" 
      placeholder="enetr name"/&gt;&lt;br/&gt;
  
    &lt;label&gt;Age&lt;/label&gt;
    &lt;input type="text" name="age" ng-model="obj.age" placeholedr="enter age" /&gt;&lt;br/&gt;
  
    &lt;label&gt;Key &lt;/label&gt;
    &lt;select ng-options="k for k in keyCollection" ng-model="key" &gt;
    &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But looks like using key in ng-model directly doesn't work , can anyone please help to achieve expected result, Thanks in advance</p>