we have an array of objects with the structure below of length minimum 1 and maximum of 1000 records. I want to split the array into chunks with a length of 100. If the total array length is 120, I need to split it into 2 chunks(1 with 100 records and 2nd with 20 records)
Can we achieve this with split or can we use Take?
Sample Structure
[
{
"Approver": "Alex",
"ApproverEmail": "###@###.com",
"Status": "Accept",
},
{
"Approver": "John ",
"ApproverEmail": "###@###.com",
"Status": "Reject",
},
..
.
.
.
.
.
1000 records
]