There are 2 arrays:
$scope.first = [
{ fName:'Alex', lName='Doe' },
{ fName:'John', lName='S' }
]
var second= [
{ fName:'Tom', lName='M', email:'<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a3d7cccee3c4cec2cacf8dc0ccce">[email protected]</a>' },
{ fName:'Jerry', lName='L', email:'<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="771d1205050e37101a161e1b5914181a">[email protected]</a>' }
]
There is a need to merge the second array into the first array to achieve the desired result:
$scope.first = [
{ fName:'Alex', lName='Doe' },
{ fName:'John', lName='S' },
{ fName:'Tom', lName='M', email:'<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f783989ab7909a969e9bd994989a">[email protected]</a>' },
{ fName:'Jerry', lName='L', email:'<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="472d2235353e07202a262e2b6924282a">[email protected]</a>' }
]