You don't change a key name. You can assign a new key name/value and then remove the previous key if you want. In your example:
var arrayObj = [{key1,'value1', key2:'value2'},{key1,'value1', key2:'value2'}];
var o = arrayObj[0]; // get first object
var val = o.key1; // get current value
o.stroke = val; // assign to new key
delete o.key1; // remove previous key
If you wanted to do that for all the objects in your main array, you would just put that in a loop that iterates over the contents of your array. I've put more intermediate assignments in here than neccessary just to document what's going on.
Or a shortened version in a loop:
for (var i = 0; i < arrayObj.length; i++) {
var o = arrayObj[i];
o.stroke = o.key1;
delete o.key1;
}