try something like :
rxjs.bufferTime
: https://rxjs.dev/api/index/function/bufferTimerxjs.switchMap
: https://rxjs.dev/api/index/function/switchMapmanipulate the data manually using plain javascript inside switchMap
and return it with rxjs.of
arrayDataObservable$.pipe(
bufferTime(1000),
switchMap((bufferd) => {
// manually defined data manipulation
const groupedObj = Object.groupBy(bufferedVal, el => Object.values(el).join(''));
const filteredDistinctValues = Object.values(groupedObj).map(el => el[0]);
// Object.groupBy doesnt respect the original array sort order, filtering from
const distinctValues = bufferdVal.filter(el => filteredDistinctValues.includes(el))
return of(...distinctValues)
}),
)
the data manipulation function could be optimized, just use mine as reference