title: Unable to access data passed by angular material dialog
body: <p>I have passed formarray values to angular material dialog. But while displaying I am getting this error: "Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Array"</p>
  
  <p>Here is my code</p>
  
  <pre><code>openDialog() {
  
  
  this.purchase_id = ("purchase" + new Date().toISOString())
  
  for(let i=0 ;i&lt;this.product.value.length; i++) {
  
  
    let new_purchase : any = {
      purchase_id : this.purchase_id,
      quantity : this.product.value[i].product_quantity,
      buyingprice : this.product.value[i].product_Buyingprice,
      date : new Date(),
      product_id : Number (this.product.value[i].product_name),
      vendor_id : this.vendor_id,
      totalprice : String (this.product.value[i].product_quantity * this.product.value[i].product_Buyingprice)
  
    }
  
  
    const dialogRef =  this.dialog.open(ConfirmDialogComponent,{data : {purchase : new_purchase} })
    dialogRef.afterClosed().subscribe(result =&gt; {
    console.log(`result : ${result}`)
  
  
    if(result == 'true') {
  
      this.newPurchase()
  
    }
  
  
  })
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>dialog ts</p>
  
  <pre><code>`export class ConfirmDialogComponent implements OnInit {
  
  
    private savedForLater : any;
  
  
    constructor(
      public containingDialog: MatDialogRef&lt;ConfirmDialogComponent&gt;,
  
      @Inject(MAT_DIALOG_DATA) public data : any)  { 
  
          this.savedForLater = data;
  
          console.log(this.savedForLater)
  
  
      }
  `
  </code></pre>
  
  <p>dialog html</p>
  
  <pre><code>    &lt;p&gt;confirm-dialog works!&lt;/p&gt;
  &lt;h2 mat-dialog-title&gt;Details&lt;/h2&gt;
  &lt;mat-dialog-content&gt; 
          &lt;div *ngFor = " let data of savedForLater"&gt; 
                  {{savedForLater.quantity}}
          &lt;/div&gt;
  &lt;/mat-dialog-content&gt;
  
  
  &lt;mat-dialog-actions&gt;
  
  
      &lt;button mat-button mat-dialog-close mat-dialog-close = "false"&gt;log out&lt;/button&gt;
      &lt;button mat-button mat-dialog-close mat-dialog-close = "true"&gt;login&lt;/button&gt;
  
  
  &lt;/mat-dialog-actions&gt; 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Yjpt8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yjpt8.png" alt="enter image description here"></a> This is the data I have passed</p>