title: AngularJS - remove duplicate records
body: <p>I am really new to the world of angularjs and I am working on angular 1.5</p>
  
  <p>What I am trying to do is remove the duplicate records from the response before assigning it to the <code>$scope</code></p>
  
  <p>The results that i get looks like as following</p>
  
  <pre><code>[
  {
      "phoneNumbers": [
        {
          "value": "00 1 111-222-333",
          "pref": false,
          "id": 0,
          "type": null
        },
        {
          "value": "00 1 222-222-333",
          "pref": false,
          "id": 1,
          "type": null
        },
        {
          "value": "00 1 333-222-333",
          "pref": false,
          "id": 2,
          "type": null
        }
      ]
    },{
      "phoneNumbers": [
        {
          "value": "00 1 111-222-333",
          "pref": false,
          "id": 0,
          "type": null
        },
        {
          "value": "00 1 222-222-333",
          "pref": false,
          "id": 1,
          "type": null
        },
        {
          "value": "00 1 333-222-333",
          "pref": false,
          "id": 2,
          "type": null
        }
      ]
    }]
  </code></pre>
  
  <p>You will notice that there are 2 arrays and both have sub array called <code>phoneNumbers</code> and they have the exact same value.</p>
  
  <p>What I need is if <code>phoneNumbers</code> of any array matches the <code>phoneNumbers</code> of another array then remove that array all together from the response.</p>
  
  <p>I will really appreciate any help on this.</p>
  
  <p><a href="https://i.stack.imgur.com/je683.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/je683.jpg" alt="enter image description here"></a></p>