let arrayObj = [{key1:'value1', key2:'value2'},{key1:'value1', key2:'value2'}]; arrayObj = arrayObj.map(item => { return { stroke: item.key1, key2: item.key2 }; });