How do you split an array of objects into an array of array of objects?
say I want to split into groups of 4, how do I do that?
[a,b,c,d,e,f,g,h] => [a,b] [c,d] [e,f] [g,h]
or maybe if I specify that I want to split into groups of 3, then the result should be [a,b,c], [d,e,f], [g,h]
it should also work if h doesn't exist.