title: Get all children from parent JSON data in React
body: <p>This is an example of my json data</p>
  
  <pre><code>[
     {
        "Id":"114",
        "Padre":"CRM",
        "Hijo":"Argumentarios"
     },
     {
        "Id":"115",
        "Padre":"CRM",
        "Hijo":"Argumentarios"
     },
        "Id":"44",
        "Padre":"Permisos",
        "Hijo":"root"
     },
     {
        "Id":"45",
        "Padre":"Permisos",
        "Hijo":"root"
     },
     {
        "Id":"50",
        "Padre":"Telefonia",
        "Hijo":"Audio"
     },
     {
        "Id":"52",
        "Padre":"Telefonia",
        "Hijo":"Configuracion"
     },
     {
        "Id":"70",
        "Padre":"Telefonia",
        "Hijo":"Rutas"
     }
  ]
  </code></pre>
  
  <p>So far I have achieved the following data in console.log:</p>
  
  <pre><code>(3) [{…}, {…}, {…}]
  0: {Padre: "CRM", Hijo: "Argumentarios", Description: "SALUD NORMAL", Id: "114"}
  1: {Padre: "Permisos", Hijo: "root", Description: "Usuarios", Id: "44"}
  2: {Padre: "Telefonia", Hijo: "Audio", Description: "Locuciones", Id: "50"}
  </code></pre>
  
  <p>I need to show all the children of each parent element. 
  I am creating a menu and I want the submenu associated with each parent to appear. I would like the children not to appear repeated. In my json parent it's Padre and Child is Hijo (is in spanish).
  This is my original code:</p>
  
  <pre><code>    componentWillMount(){
          fetch('fake-son.php')
          .then(response =&gt; response.json())
          .then(menuSubmenu =&gt;{
  
              const result = [];
              const map = new Map();
              for (const item of menuSubmenu) {
                  if(!map.has(item.Padre)){
                      map.set(item.Padre, true);    // set any value to Map
  
                      result.push({
                          Padre: item.Padre,
                          Hijo: item.Hijo,
                          Description: item.Description,
                          Id:item.Id
                      });
                  }
              }
                  this.setState({ 
                      menuSubmenu:this.state.menuSubmenu.concat(result)
                  })
  
              console.log(result);         
  
          })
      }
  </code></pre>
  
  <p>Can you help me show all the children about their father? Thanks a lot</p>