Hello, I am encountering an Error
The error message says "concat is not a function"
Here is what I am attempting
searchResults:any; // inside class export
results:any
this.candidateSearch.postSearch(this.searchedInput,"candidateSearch").then((result)=>{
this.results = result;
console.log(this.results.details);
this.searchResults = this.searchResults.concat(this.results); // throwing error
}, (err) => {
});
The output format of my result looks like the following:
{
"details": [{
"company_name": "Cybrain Software Solutions",
"skills": "php,laravel",
"package": "15 lakh",
"location": "Bengaluru",
"industry": "Software",
"job_type": "permanent"
}, {
"company_name": "Floret Media Pvt Ltd",
"skills": "php",
"package": "10 lakh",
"location": "Bengaluru",
"industry": "software",
"job_type": "per"
}]
}
My question is: How can I concatenate the previous results?
EDIT: My goal is to have the searchResults
array in the format
{"details":[{},{},{}]} after concatenating