title: Angular - How to update table with new values
body: <p>I have a table with <code>ng-repeat</code>:</p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;thead&gt;
        &lt;th&gt;key&lt;/th&gt;
        &lt;th&gt;value&lt;/th&gt;
      &lt;/thead&gt;
    &lt;/tr&gt;
    &lt;tbody ng-repeat = "i in data"&gt;
    &lt;td&gt;{{i.key}}&lt;/td&gt;
    &lt;td&gt;{{i.value}}&lt;/td&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The <code>table</code> is populated with <code>data-ng-init</code>, when the user clicks on a button:</p>
  
  <pre><code>&lt;button ng-click="getNewVals()"&gt;new values&lt;/button&gt;
  </code></pre>
  
  <p>I get <code>json</code> with new <code>key-value</code>, my question is how to repopulate the table with the new values baes on the <code>key</code>? is there a angular way to do so?</p>