I have a object Array
var dataArray = [
{ 'nation': 'TW', 'sales':'Jack', 'amount': 3000 },
{ 'nation': 'HK', 'sales':'Chen', 'amount': 3200 },
{ 'nation': 'SZ', 'sales':'Tomm', 'amount': 2800 },
{ 'nation': 'SH', 'sales':'Alan', 'amount': 1900 },
{ 'nation': 'JP', 'sales':'Will', 'amount': 1200 }
] ;
I like to do calculation of (amount *5) then push the result back to the Object array Is there a way to do that?
what i want as result
var dataArray = [
{ 'nation': 'TW', 'sales':'Jack', 'amount': 3000 ,'calv':15000},
{ 'nation': 'HK', 'sales':'Chen', 'amount': 3200 ,'calv':16000} ,
{ 'nation': 'SZ', 'sales':'Tomm', 'amount': 2800 ,'calv':14000},
{ 'nation': 'SH', 'sales':'Alan', 'amount': 1900 ,'calv':9400} ,
{ 'nation': 'JP', 'sales':'Will', 'amount': 1200 ,'calv':6000}
] ;