I want to assign only those keys which are already present in the target object and not the other keys that are done by the object.assign method.
example
a = { x: 2}
b = {x:3, y:4}
then result = {x:3}
I know there are other ways in past but is there any newer and better ways to do this like in one line?