title: my data from api is array but response from it is object
body: <p>the data of api is array but the response i am getting from it is as an object using following method</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  @Component({
    selector: 'app-shipment',
    templateUrl: './shipment.component.html',
    styleUrls: ['./shipment.component.css'],
  })
  export class ShipmentComponent implements OnInit {
    li: any;
    shipment = [];
    constructor(private http: HttpClient) {}
  
    ngOnInit(): void {
      this.http.get('http://localhost:3000/shipments').subscribe((response) =&gt; {
        this.li = response;
      });
    }
    getShipments(): void {
      console.log(this.li);
    }
  }
  </code></pre>