employeeView() method will get the list of employee data as an object,i want to store each object data into array
constructor(private userService: employeeviewservices) {
this.userService.employeeView().subscribe(data => this.EmployeeData=data),
this.EmployeeData.forEach(i=>{
this.resultArray.push(
{
"id":i.id,
"name":i.name,
});
});
forEachinside thesubscribe