The goal is to break an object of unknown length and shape into small objects 3 elements each. Only vanilla JS solution; I don't want to use _.pick etc.
Example of large object:
const data = {
someFirstKey: 'someFirstVal',
someSecondKey: 'someSecondVal',
...
someLastKey: 'someLastVal'
}
Desired chunk with 3 keys:
{someKey0: 'someVal0', someKey1: 'someVal1', someKey2, 'someVal2'}
Using Object.fromEntries:
Ok, so this might not be the most efficient way, but it works on my box. ;)
Based on the comments, it seems like you are actually looking for a way to split an object up into several smaller objects. I would approach that like this: