Guest User

Untitled

a guest
Feb 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import { pairs } from 'rxjs';
  2.  
  3. interface Car {
  4. id: string;
  5. name: string;
  6. }
  7.  
  8. const carsEntity: {[key: string]: Car} = {
  9. 'xyz': { id: 'xyz', name: 'Mazda' },
  10. 'abc': { id: 'abc', name: 'Porsche' }
  11. };
  12.  
  13. pairs(carsEntity).pipe(
  14. map(([_, car]) => car)
  15. ).subscribe(console.log);
Add Comment
Please, Sign In to add comment