I want to initialise selectedElement with the id of the elements object in vuejs.
This is not working:
data() {
return {
elements: [
{ id: 0, name: 'Simple elements' },
{ id: 1, name: 'Call to action' },
],
selectedElement: elements[0]
};
},