title: How to get the json array size inside the component in Angular 6
body: <p>I am working in an angular 6 project , here I need to get the size of the array which comes from the API response .</p>
  
  <p>While inspect the data which I have received from API call ,I can see that the array size is 3 in console .I don't know how to get the array size in a component variable.</p>
  
  <pre><code>ngOnInit() {
      this.CartdataService.get_Basic_Images().subscribe(
        data =&gt; {
          this.get_Carousel_Images = data['1'].filter((img, i) =&gt; i !== 0);
          this.slider_Active_Item = data[1][0]['CAROUSEL_IMAGE_PATHS'];
          console.log(data) // how to get the array size here
        });
    }
  </code></pre>
  
  <p>Link : <a href="https://stackblitz.com/edit/angular-bootstrap-carousel-dynamic2-prrges?file=app%2Fone%2Fone.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-bootstrap-carousel-dynamic2-prrges?file=app%2Fone%2Fone.component.ts</a></p>
  
  <p>Thanks</p>