title: How to bind data to primeng table in angular2
body: <p>Hai i am using primeng table, now i need to bind values to html, but facing an error as </p>
  
  <pre><code>Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
  </code></pre>
  
  <p>I am not getting where i am going wrong.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;p-table #dt [columns]="tableHeaders" [value]="Medication"&gt;
                &lt;ng-template pTemplate="header" let-columns&gt;
                  &lt;tr role="row"&gt;
                    &lt;th&gt;data1&lt;/th&gt;
                    &lt;th&gt;data2&lt;/th&gt;
                    &lt;th&gt;data3&lt;/th&gt;
                    &lt;th&gt;data4&lt;/th&gt;
                  &lt;/tr&gt;
                &lt;/ng-template&gt;
                &lt;ng-template pTemplate="body" let-rowData let-columns="columns"&gt;
                    &lt;td&gt;{{rowData.data1}}&lt;/td&gt;
                    &lt;td&gt;{{rowData.data2}}&lt;/td&gt;
                    &lt;td&gt;{{rowData.data3}}&lt;/td&gt;
                    &lt;td&gt;{{rowData.data4}}&lt;/td&gt;
                  &lt;/tr&gt;
                &lt;/ng-template&gt;
              &lt;/p-table&gt;
  </code></pre>
  
  <p>TS:</p>
  
  <pre><code>Medication: any[];
  getEmrExportList() {
      let params = { 'Id': this.userId }
      this.emrService.getExportDetails(params)
        .subscribe(exportLists =&gt; {
          this.emrExportToCCDList = exportLists.Body.Data;
          this.Medication = this.emrExportToCCDList.Medication;
        })
    }
  </code></pre>
  
  <p>Console:
  console.log(this.emrExportToCCDList);</p>
  
  <pre><code>{Device: {…}, Medication: {…}, Immunize: {…}}
  Device: {DeviceName: "scissore", DeviceSuppliedDate: "2018-10-09T18:30:00.000Z"}
  Immunize: {VaccineCode: "DTaP, 5 pertussis antigens", Status: "entered-in-error", Date: null}
  Medication: {data1: "medication1", data2: "2018-08-15T18:30:00.000Z", data3: "instruction1", data4: "Active"}
  __proto__: Object
  </code></pre>