I have this kind of object in data:
data () {
return {
foo: {a: 'A', b: 'B', c: {title: "Main"}};
}}
I need to get exact copy of this object but change one thing there
foo2: {a: 'A', b: 'B', c: {title: "Copy"}};
I tried setting foo2 in data as:
foo2: {...foo, c['title']:'Copy'},
But Im getting error:
error Parsing error: Unexpected token, expected ","