title: Vue.js 2: Delete property from data object
body: <p>How can you delete a property/key from a Vue.js data object (i.e. associative array) like this:</p>
  
  <pre><code>var vm = new Vue({
      data: {
          users: {
              foo : { firstName: ..., lastName: ... },
              bar : { firstName: ..., lastName: ... }
          }
      },
      methods: {
          someFunction : function ()
          {
              // how to remove `users.foo`?
          }
      }
  });
  </code></pre>
  
  <p>Googling around, I found these two ways, but both don't work:</p>
  
  <ul>
  <li><code>delete this.users.foo;</code> is not updating the DOM</li>
  <li><code>this.users.splice('foo', 1);</code> is not working at all (probably only works on arrays, not on objects)</li>
  </ul>