I have two arrays like this:
var obj1 = [{'target_object_id': 1, 'extra': 'ok'}, {'target_object_id': 2, 'extra': 'ok'}]
var obj2 = [{'id': 4}, {'id': 2}]
What I want to do is loop through obj1 and obj2 and
if obj1.target_object_id == obj2.id // Append obj2['extra']=obj.extra
How to do this in angular?