title: Get Selected Option Of Multiple List of MatSelectionList - Angular 6
body: <p>Im looking for a solution for this:
  I have this  </p>
  
  <pre><code> result = [
      {
        "roomsFloor": {
            "floor": {
              "floorName": "piso 1",
              "room": [{
                "roomNumber": "103"
              }]
            }
          }
      },
     {
        "roomsFloor": {
            "floor": {
              "floorName": "piso 2",
              "room": 
              [
                {
                  "roomNumber": "104"
                },
                  {
                  "roomNumber": "105"
                }            
              ]
            }
          }
      },
    ]
  </code></pre>
  
  <p>Im using Angular Material 6 with MatExpanssionPanel, MatAcrodion, MatSelectionList for represent this data, but i need get an array with selected option for every Accordion</p>
  
  <p>I try with this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;mat-accordion&gt;
    &lt;mat-expansion-panel *ngFor="let item of result" hideToggle = "false"&gt;
      &lt;mat-expansion-panel-header&gt;
         &lt;mat-panel-title style="color: #44474B"&gt;
             &lt;strong&gt;&lt;p&gt;{{item.roomsFloor.floor.floorName}}&lt;/p&gt;&lt;/strong&gt;
         &lt;/mat-panel-title&gt;
         &lt;mat-panel-description&gt;          
         &lt;/mat-panel-description&gt;
      &lt;/mat-expansion-panel-header&gt;
      &lt;ng-template matExpansionPanelContent&gt;
         &lt;mat-selection-list #items (selectionChange)="handleSelection(items.selectedOptions)"&gt;
             &lt;mat-list-option *ngFor="let roomDetail of item.roomsFloor.floor.room" [value]="roomDetail"&gt;
                &lt;mat-icon mat-list-icon&gt;meeting_room&lt;/mat-icon&gt;
                &lt;h4 mat-line&gt;No. {{roomDetail.roomNumber}}&lt;/h4&gt;
            &lt;/mat-list-option&gt;
        &lt;/mat-selection-list&gt;
      &lt;/ng-template&gt;                   
     &lt;/mat-expansion-panel&gt;
  &lt;/mat-accordion&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>.TS component</p>
  
  <pre><code>   handleSelection(itemRoomSelected) {
          this.selectedRooms = itemRoomSelected.selected.map(item =&gt; item.value);
          console.log('selected room', this.selectedRooms);
      }
  </code></pre>
  
  <p>This method show me the selected item for accordion section opened but when open other item of accordion and select others item in the selection list, then the array is reset with new value from current accordion section.</p>
  
  <p>What could be the solution, Thanks</p>