I want to merge two arrays of objects. The keys are the same but the values might not always be the same.
Any solution is appreciated preferably in javascript, but
Here's a Python solution. This modifies g, which you may or may not want.
g
c_by_id = {d['id']: d for d in c} for item in g: item.update(c_by_id.get(item['id']), {})