Check out this code snippet. Can you provide some assistance?
responseArray: any[] = [];
proResponseArray: any[] = [];
clearArray(res: any[]): void {res.length = 0; this.response.total = 0; }
handleSubmit(searchForm: FormGroup) {
this.showOrHide = true;
this.proResponseArray = [];
this.proName = '';
this.searchService.searchAndGetResults(searchForm.value).subscribe((resultArray: any[]) => {
console.log('Received Result: ' + resultArray.toString());
this.responseArray = resultArray;
}, (error: any) => {
console.log('Error Loading Search Result: ' + error);
});
}