How can I merge properties of two JavaScript objects dynamically? How can I merge properties of two JavaScript objects dynamically?