title: Angular 6 PrimeNG - how to add a checkbox with distinct values from one column?
body: <p>I have example Angular PrimeNG code for creating a Html Table:</p>
  
  <pre><code>&lt;h3 class="first"&gt;Basic&lt;/h3&gt;
  &lt;p-table [value]="cars"&gt;
      &lt;ng-template pTemplate="header"&gt;
          &lt;tr&gt;
              &lt;th&gt;Vin&lt;/th&gt;
              &lt;th&gt;Year&lt;/th&gt;
              &lt;th&gt;Brand&lt;/th&gt;
              &lt;th&gt;Color&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
      &lt;ng-template pTemplate="body" let-car&gt;
          &lt;tr&gt;
              &lt;td&gt;{{car.vin}}&lt;/td&gt;
              &lt;td&gt;{{car.year}}&lt;/td&gt;
              &lt;td&gt;{{car.brand}}&lt;/td&gt;
              &lt;td&gt;{{car.color}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
  &lt;/p-table&gt;
  
  &lt;h3&gt;Dynamic Columns&lt;/h3&gt;
  &lt;p-table [columns]="cols" [value]="cars"&gt;
      &lt;ng-template pTemplate="header" let-columns&gt;
          &lt;tr&gt;
              &lt;th *ngFor="let col of columns"&gt;
                  {{col.header}}
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
      &lt;ng-template pTemplate="body" let-rowData let-columns="columns"&gt;
          &lt;tr&gt;
              &lt;td *ngFor="let col of columns"&gt;
                      {{rowData[col.field]}}
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
  &lt;/p-table&gt;
  </code></pre>
  
  <p>How to create a dynamic checkbox (e.g. on the left side of a screen next to a table) so that options are generated based on unique values from a column? 
  (something like <a href="https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&amp;field-keywords=toaster" rel="nofollow noreferrer">Amazon</a> has on the left side of the screen):
  <a href="https://i.stack.imgur.com/l8C2N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l8C2N.png" alt="enter image description here"></a></p>
  
  <p>And based on a click for each checkbox - it would show subset of rows in a table...</p>
  
  <p>Thanks</p>