I am creating array using below format,
angular.forEach(value.data, function(value1, key1) {
shiftArrayList.push({
shift: value1.shiftName
});
dataArrayList.push({
safeDayCount: value1.safeDayCount,
accidentCount: value1.accidentCount,
hazardCount: value1.hazardCount,
nearMissCount: value1.nearMissCount
});
});
and the result for dataArrayList will be like,
"safeDayCount": 0,
"accidentCount": 0,
"hazardCount": 39,
"nearMissCount": 0
and it continues. But i need to append the label name inside the foreach and for every label i need to append value1.shiftName. like safeDayCount + "_"+value1.shiftName. So it will be like safeDayCount_X, accidentCount_X, hazardCount_X, nearMissCount_X.. Please help me to append the value.
Thanks in Advance,