title: destructuring inner objects with same name property
body: <p>hi all I have below object structure that i am trying to get the name of all inner objects using destructuring technique but could not be able to do that, Below is the object structure</p>
  <pre><code>   {
         massingType {
              id
              name
          }
          ashraeClimateZone {
               id
              name
          }
          sourceOfData {
               id
               name    
          }
          .....
      } 
  </code></pre>
  <p>and i am doing the destrcturing like as below</p>
  <pre><code> constructionSetData.constructionSets.forEach(item =&gt; {
      if (
        item.ashraeClimateZone?.id === ashraeClimateZoneId &amp;&amp;
        item.massingType?.id === massingTypeId &amp;&amp;
        item.sourceOfData?.id === energyCodeId
      ) {
        matchedConstructionDataSet.push(item.name);
        const { sourceOfData: name, massingType: name, ashraeClimateZone: name } = item; // getting error here Identifier 'name' has already been declared 
      }
    });
    return matchedConstructionDataSet.length
      ? `${matchedConstructionDataSet.join(', ')}` // here i need to use above names coming from three inner objects
      : 'No construction set found with the current criteria';
  </code></pre>
  <p>Could any one please let me know how can i achieve this solution, many thanks in advance!!</p>