I have an array with objects similar to this:
[{
name: '2015',
data: [...]
color: 'orange'
},
{
name: '2016',
data: [...]
color: 'red'
}
]
I would like to change the value of name
to another name, type MarketShare
, so instead of the year, I would have a name. This all I have to do in Javascript
The result I hope is
[{
name: 'marketshare',
data: [...]
color: 'orange'
},
{
name: 'marketshare',
data: [...]
color: 'red'
}
]