地图显示过滤器后rxjs 6过滤器不起作用

时间:2019-03-24 22:06:27

标签: angular firebase rxjs

使用地图后,我尝试过滤数据,但出现错误消息:

  

data.favorite.filter不是函数

我在哪里错了?

数据库结构

uid{
   name
   age
   favorite{
            id{
               name
               }
            }
    }
this.db.getDataObj("/Profile/" + this.uid).pipe(
map(data => 
  data.favorite.filter(c=> 
    c.name === this.name))).subscribe(res => console.log(res));

0 个答案:

没有答案
相关问题