Posts

Showing posts with the label response

JavaScript extract matched ids for array of objects

JavaScript extract matched ids for array of objects I have an array of objects containing employeeProjectId which might be same. So what I am looking for is that if there is more than one same employeeProjectId then merge the results into one object with having projectRoles in the form of array. Response is given below for reference. Thankyou :) { "code": 200, "success": true, "message": "Successfully completed", "data": [ { "employeeProjectId": 1, "projectRoleId": 1, "employee_project": { "id": 1, "status": true, "type": "backup", "startDate": "2018-06-28T07:20:36.000Z", "endDate": "2018-06-29T07:20:39.000Z", "allocation": 100, "employeeId": 326, "projectId": 35, ...