title: Removing duplicates data from array using angular 9
body: <p>I have an array with below list of array as shown in image ,  I would like to remove the duplicates array "Qualif" and "Prod"</p>
  
  <p><a href="https://i.stack.imgur.com/Z6wPP.png" rel="nofollow noreferrer">what i have</a></p>
  
  <p>I want to be like that </p>
  
  <p><a href="https://i.stack.imgur.com/iztXC.png" rel="nofollow noreferrer">what i want</a></p>
  
  <p>I have tried with the following conditions</p>
  
  <p><strong>Scenario1</strong> :</p>
  
  <pre><code>   this.Default_data_historique=Object.values(this.nouveau_data_historique.reduce((c,e)=&gt;{
              if (!c[e.PTF_NAME]) c[e.PTF_NAME] =e; return c; },{}));
  </code></pre>
  
  <p><strong>Scenario2</strong> :</p>
  
  <pre><code>this.Default_data_historique= Array.from(new Set(this.nouveau_data_historique))
  </code></pre>
  
  <p><strong>Scenario3</strong> :</p>
  
  <pre><code>this.Default_data_historique=this.nouveau_data_historique.filter(function(elem,index,self){
            return index === self.indexOf(elem)
          });
  </code></pre>
  
  <p>None of the three scenarios above were able to remove the duplicates from that array. Could any one please help on this ?</p>
  
  <p><strong>Edit:</strong>
  sample data i have </p>
  
  <pre><code>[
      [{
              "PTF_NAME": "integration",
              "Salle": "salle1"
          },
          {
              "PTF_NAME": "integration",
              "Salle": "salle1"
          }
      ],
      [{
              "PTF_NAME": "Qualif",
              "Salle": "salle1"
          },
          {
              "PTF_NAME": "Qualif",
              "Salle": "salle1"
          }
      ],
      [{
              "PTF_NAME": "Qualif",
              "Salle": "salle2"
          },
          {
              "PTF_NAME": "Qualif",
              "Salle": "salle2"
          }
      ],
      [{
              "PTF_NAME": "Prod",
              "Salle": "salle1"
          },
          {
              "PTF_NAME": "Prod",
              "Salle": "salle1"
          }
      ],
      [{
              "PTF_NAME": "Prod",
              "Salle": "salle2"
          },
          {
              "PTF_NAME": "Prod",
              "Salle": "salle2"
          }
      ]
  ]
  </code></pre>
  
  <p>what i want</p>
  
  <pre><code>[
      [{
              "PTF_NAME": "integration",
              "Salle": "salle1"
          },
          {
              "PTF_NAME": "integration",
              "Salle": "salle1"
          }
      ],
      [{
              "PTF_NAME": "Qualif",
              "Salle": "salle1"
          },
          {
              "PTF_NAME": "Qualif",
              "Salle": "salle1"
          }
      ],
  
      [{
              "PTF_NAME": "Prod",
              "Salle": "salle1"
          },
          {
              "PTF_NAME": "Prod",
              "Salle": "salle1"
          }
      ]
  
  ]
  </code></pre>