Guest User

Untitled

a guest
Feb 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. export class stru {
  2.  
  3. "date": string;
  4. "items": string;
  5.  
  6. }
  7.  
  8. getstru(): Observable<stru[]> {
  9. return this.http
  10. .get(
  11. API_URL + "stru/"
  12. )
  13. .pipe(map((response: Response) => < stru[] > response.json()));
  14. }
  15.  
  16. this.Service.getstru().subscribe(res => {
  17. this.test= res;
  18. this.ledger= this.test;
  19. this.sortedflt=this.ledger.filter(task => task.items === "item1");
  20. console.log("filteres",this.sortedflt);
  21. })
Add Comment
Please, Sign In to add comment