pluck
signature: pluck(properties: ...args): Observable
Example 1: Pluck object property
Example 2: Pluck nested properties
import { from } from 'rxjs/observable/from';
import { pluck } from 'rxjs/operators';
const source = from([
{ name: 'Joe', age: 30, job: { title: 'Developer', language: 'JavaScript' } },
]);
//grab title property under job
const example = source.pipe(pluck('job', 'title'));
Additional Resources
- Official docs