Here is the sample object
{
abc_0: 'a',
bcd_0: 'b',
cde_0: 'c',
abc_1: 'a',
bcd_1: 'b',
cde_1: 'c',
def_1: 'd',
}
I want to group via the number they end with and wante the expected output to be
{
0: {abc: 'a', bcd: 'b', cde: 'c'},
1: {abc: 'a', bcd: 'b', cde: 'c', def : 'd'},
}