I have obtained attributes from objects within an array that I need to store in another array. Here is the data I am working with:
https://i.sstatic.net/b0JtY.jpg
My goal is to extract the `displays` name attribute and save it in the `opt[]` array, which would result in something like this:
opt = ['info1', 'info2', 'info3', ... ]
getEditData (id) {
axios.get('/api/campaign/getEdit/' + id)
.then(response =>{
this.campaign = response.data.campaign;
})
.catch(e=>{
console.log(e.data);
this.error = e.data
})
}
The snippet above shows how the campaign object is being sourced.