I've a observable that parse large csv file (can not fit in memory) and emits elements like :
[{id=1, childId=1}, {id=1, childId=2}, {id=1, childId=3}, {id=2, childId=5}, {id=2, childId=6}, {id=1, childId=23}, {id=1, childId=18}]
one item by line.
When using groupBy, my output is something like
[{id=1, childs=1,2,**323, 18**}, {id=2, childs=5,6}]
It seems normal for groupBy. But what I need is to receive grouped elements for consecutive items, so I want to receive last items with id=1 in another element. In total, I would like to receive 3 elements.
So I want to receive one observable for the same key in a consecutive way, and when I have a different key, I want to receive another observable (group by).
Thank you in advance