Trying to merge two arrays with some simmilar occurances in two array here's what i did
var json_dest = [
    {
        "legID":"12121",
    "message":212112
    },
  {
    "legID":"12122",
    "message":212112
  }
];
var json_src = [
        {
        "legID":"12121",
    "message":212100
    },
  {
    "legID":"12123",
    "message":212112
  }
];
console.log(angular.merge(json_dest, json_src));
the output is:
[
   {
     "legID":"12121",
     "message":212100
   },
   {
     "legID":"12123",
     "message":212112
   }
]
it merged the duplicates
but i am missing the other legID "12123"
i need to know how it can be done efficiently ?
and also why is it happening ?
 
     
     
     
    