I have array structure of employee information in JavaScript
var emplyeeinfo=[{
empNo: 12302,
empId: '30984',
empJobCategory: 'Designer',
},
{
empNo: 14785,
empId: '33420',
empJobCategory: 'Associate Manager',
},
{
empNo: 13710,
empId: '32603',
empJobCategory: 'Designer',
},
{
empNo: 13783,
empId: '32675',
empJobCategory: 'Designer',
},
{
empNo: 15069,
empId: '33619',
empJobCategory: 'Designer',
},
{
empNo: 14285,
empId: '33020',
empJobCategory: 'Validator',
},
{
empNo: 14476,
empId: '33185',
empJobCategory: 'Designer',
}];
and want to build array from above information
var employeejob=[{'Designer':[12302,13710,13783,15069,14476]},
{'Associate Manager':[14785]},
{'Validator':'[14285]}
];
I did not find any proper mechanism to build this array in JavaScript and from this array want to build following array for high-chart series
var finalchart={series:[7,5,1,1],
category:['Total','Designer','Associate Manager','Validator']};