I want to merge two A3 Objects together which contain some of the same Keys but different values. I've found many posts regarding adding two Objects together but I want to merge the two objects together so if the second object has different values they take priority. I have two Objects below:
_propsObj = new Object();
_propsObj.baseColour = 0x303237;
_propsObj.animation = false;
_propsObj.font = "Verdana";
_propsObj.fontColour = 0xffffff;
_propsObj.baseFontSize = 14;
_propsObj2 = new Object();
_propsObj2.animation = true;
_propsObj2.fontColour = 0xffffff;
_propsObj2.baseFontSize = 10;
My desired ouput Object would accept the new values of the second Object but maintain the values of the first Object :
_outputObj.baseColour = 0x303237;
_outputObj.animation = true;
_outputObj.font = "Verdana";
_outputObj.fontColour = 0xffffff;
_outputObj.baseFontSize = 10;
I wasn't sure if I should be using Arrray.concat do this or if there is an easier solution? Any help would be appreciated.