I want to get index zero record from Array Object dataList in the below code snippet. I am new to JavaScript and Typescript.
dataList: Array<any> = [];
data: any;
constructor(private apiService: ApiService) {
this.apiService.getEncounterDashBoard(this.searchCond)
.subscribe(data => {
this.dataList = data.result;
});
let labels = this.dataList[0];
}