My requirement is compare two objects and copy updated values into first object from second object. Ex :
$scope.obj1={"id" : 1, "name" : "java"}
$scope.obj2={"id" : 1, "name" : "java4you", "gender" : "male"}
compare(destination, bj1, obj2);
Destination variable Output:
{"id" : 1, "name" : "java4you"}
The above two objects contains same keys but values are different. I have to compare obj1 and obj2 and update with matched obj2 values
extendwill include"gender":"male".