title: Copy object and change nested property in Vue
body: <p>I have this kind of object in data:</p>
  <pre><code>data () {
  return {
      foo: {a: 'A', b: 'B', c: {title: &quot;Main&quot;}};
  }}
  </code></pre>
  <p>I need to get exact copy of this object but change one thing there</p>
  <pre><code>foo2:  {a: 'A', b: 'B', c: {title: &quot;Copy&quot;}};
  </code></pre>
  <p>I tried setting <code>foo2</code> in data as:</p>
  <pre><code>foo2: {...foo, c['title']:'Copy'},
  </code></pre>
  <p>But Im getting error:</p>
  <pre><code>error  Parsing error: Unexpected token, expected &quot;,&quot;
  </code></pre>