I am trying to combine two object arrays using either Javascript or Jquery but it is not resulting the way I am expecting it to be. These are my array objects results:
Arry1 Results: [{"name": "2412"}, {"name": "3324"}, {"name": "8875"}]
Arry2 Results: [{"zip": "12051"}, {"zip": "54021"}, {"zip": "24521"}]
This is what I have done to push one into the other:
Array.prototype.push.apply(Arry1,Arry2);
The issue is the above code stacks them together. The object structure I am trying to get is as follows:
[ 
{
 "name": "2412",
 "zip": "12051"
},
{
 "name": "3324",
 "zip": "54021"
},
{
"name": "8875",
 "zip": "24521"
}
]
 
     
     
    