I want to chunk an associative array. Every item of the given array contains information about an employee.
Given array,
// given array
var arr = {
"00B065011K": {
"salary": "35900",
"date": "2020-12-01"
},
"00B101794N": {
"salary": "8308",
"date": "2020-12-01"
},
"00C100365N": {
"salary": "28400",
"date": "2020-12-01"
},
"00D100179N": {
"salary": "8308",
"date": "2020-12-01"
},
"00D100192N": {
"salary": "8308",
"date": "2020-12-01"
},
"00E101558N": {
"salary": "10245",
"date": "2020-12-01"
},
"00F100529N": {
"salary": "10245",
"date": "2020-12-01",
},
"00F100543N": {
"salary": "10245",
"date": "2020-12-01"
},
"00G100121N": {
"salary": "8618",
"date": "2020-12-01"
},
};
I want 3 employee information per chunk and output will be,
I have tried Split array into chunks but not getting the expected output.