Skip to content

Commit

Permalink
docs(groupBy): fix a typo in the example of the instance operator gro…
Browse files Browse the repository at this point in the history
…upBy (#2619)
  • Loading branch information
SangKa authored and benlesh committed Jun 14, 2017
1 parent fd5b8e5 commit 25a3d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operator/groupBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function groupBy<T, K, R>(this: Observable<T>, keySelector: (value: T) =>
* {id: 3, name: 'qfs1'},
* {id: 2, name: 'qsgqsfg2'}
* )
* .groupBy(p => p.id, p => p.anme)
* .groupBy(p => p.id, p => p.name)
* .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], ["" + group$.key]))
* .map(arr => ({'id': parseInt(arr[0]), 'values': arr.slice(1)}))
* .subscribe(p => console.log(p));
Expand Down

0 comments on commit 25a3d64

Please sign in to comment.