I have two nested stdClass (multiple values).
$object1 = json_decode ('{"key":"value", "emailing":{"live":false, "test":true}}')
$object2 = json_decode ('{"key":"value", "params:{"emailing":{"live":false, "test":true}, "esp":"email"}}')
I want to change a property of first object with some property of second. Both are stdClasses, tested with is_object. However I can't copy value to first object.
$object1->emailing = $object2->params->emailing;
Where all are of type stdClass.