I have an array containing three columns like this:
data.push({
country: new Date(),
newSales: Math.random() * 1000,
expenses: Math.random() * 5000
});
Now, on button click, I want to add a new column in it. Can anyone let me know how we can do it?
data[0].newcolumnname = 'whatever value'