title: Get First Index in Array Object Type Scripts
body: <p>I want to get index zero record from Array  Object <strong>dataList</strong> in the below code snippet. I am new to JavaScript and Typescript. </p>
  
  <pre><code>dataList: Array&lt;any&gt; = [];
   data: any;
  
   constructor(private apiService: ApiService) {  
  
  
     this.apiService.getEncounterDashBoard(this.searchCond)
       .subscribe(data =&gt; {
         this.dataList = data.result;
       });
  
      let labels = this.dataList[0];
  }
  </code></pre>