title: I want to remove duplicates from array of array of objects
body: <p>I want to remove duplicates from an array of objects can anyone help with this to remove duplicates in the array of objects. I have an array of array of objects that I want to remove duplicates and I want to use</p>
  <pre><code>const firstArray = [
    {
      first: &quot;01&quot;,
      data: [
        { id: &quot;01&quot;, name: &quot;test1&quot; },
        { id: &quot;02&quot;, name: &quot;test2&quot; },
        { id: &quot;03&quot;, name: &quot;test3&quot; },
        { id: &quot;05&quot;, name: &quot;test1&quot; },
        { id: &quot;06&quot;, name: &quot;test2&quot; },
        { id: &quot;07&quot;, name: &quot;test1&quot; }
      ]
    },
    {
      first: &quot;02&quot;,
      data: [
        { id: &quot;01&quot;, name: &quot;test2&quot; },
        { id: &quot;02&quot;, name: &quot;test1&quot; },
        { id: &quot;03&quot;, name: &quot;test3&quot; },
        { id: &quot;05&quot;, name: &quot;test2&quot; },
        { id: &quot;06&quot;, name: &quot;test2&quot; },
        { id: &quot;07&quot;, name: &quot;test1&quot; }
      ]
    },
    {
      first: &quot;03&quot;,
      data: [
        { id: &quot;01&quot;, name: &quot;test3&quot; },
        { id: &quot;02&quot;, name: &quot;test2&quot; },
        { id: &quot;03&quot;, name: &quot;test3&quot; },
        { id: &quot;04&quot;, name: &quot;test2&quot; },
        { id: &quot;05&quot;, name: &quot;test3&quot; },
        { id: &quot;07&quot;, name: &quot;test1&quot; }
      ]
    }
  ];
  </code></pre>
  <p>this is the sample result code i am expecting :</p>
  <pre><code>const firstArray = [
    {
      first: &quot;01&quot;,
      data: [
        { id: &quot;01&quot;, name: &quot;test1&quot; },
        { id: &quot;02&quot;, name: &quot;test2&quot; },
        { id: &quot;03&quot;, name: &quot;test3&quot; },
      ]
    },
    {
      first: &quot;02&quot;,
      data: [
        { id: &quot;01&quot;, name: &quot;test1&quot; },
        { id: &quot;02&quot;, name: &quot;test2&quot; },
        { id: &quot;03&quot;, name: &quot;test3&quot; },
      ]
    },
    {
      first: &quot;03&quot;,
      data: [
        { id: &quot;05&quot;, name: &quot;test1&quot; },
        { id: &quot;06&quot;, name: &quot;test2&quot; },
        { id: &quot;07&quot;, name: &quot;test3&quot; }
      ]
    }
  ];```
  </code></pre>