Merge two JSON object based on common value in javascript? : I have the following situation with two object that I have to merge based on value1 and i know the property is key1= namekey1 :

obja = [{ key1: value1; a : 1 ; b : 2}]
objb = [ {namekey1: value1; d : 3 ; c : 4}]

Desired result
objc = [ key1: value1; a : 1 ; b : 2 ;d : 3 ; c : 4]

Is there a way I can do this?

Thanks