title: ERROR TypeError: Cannot read properties of undefined (reading '_id')
body: <p>I am trying to display a data entry (with a unique id) on angular, but im receiving the error</p>
  <blockquote>
  <p>ERROR TypeError: Cannot read properties of undefined (reading '_id')</p>
  </blockquote>
  <p>the service for the get request for the particular id is:</p>
  <pre><code>getOneDAFacForm(id: string) {
      return this.http.get&lt;any&gt;(&quot;http://localhost:3000/DAFacility&quot;+id)
      .pipe(map((res:any)=&gt;{
        return res;
      }))
    }
  </code></pre>
  <p>The path for the component is as follows:</p>
  <pre><code>{ path: 'daform-fac-view-full/:facviewid', component: DaformFacViewFullComponent},
  </code></pre>
  <p>the typescript for the page component:</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { ActivatedRoute } from '@angular/router';
  import { DAFormFac } from 'src/app/models/daformfac.interface';
  import { DaformfacserviceService } from 'src/app/service/daformfacservice.service';
  
  @Component({
    selector: 'app-daform-fac-view-full',
    templateUrl: './daform-fac-view-full.component.html',
    styleUrls: ['./daform-fac-view-full.component.css'],
  })
  export class DaformFacViewFullComponent implements OnInit {
    daformfac: DAFormFac[] = [];
  
    formID: string;
    getparamformid: any;
    daformfacs: any;
  
    constructor(
      private daformfacservice: DaformfacserviceService,
      private route: ActivatedRoute
    ) {}
  
    ngOnInit(): void {
      console.log(
        this.route.snapshot.paramMap.get('facviewid'),
        ' : ID of report'
      );
      this.getparamformid = this.route.snapshot.paramMap.get('facviewid');
      this.daformfacservice.getOneDAFacForm(this.getparamformid).subscribe((daFormFac: DAFormFac[]) =&gt; {
          this.daformfacs = daFormFac;
          console.log(daFormFac, 'response of form');
        });
    }
  }
  </code></pre>
  <p>and in the html component, i am trying to display the info stored like:</p>
  <pre><code>Report ID : {{daformfacs._id}} 
  </code></pre>
  <p>Is there anything im doing wrong with this any assistance would be appreciated.</p>