想取出有parentProjectId
的数据,line1 输出如下数据,line2 undefined
.
该如何写?
this.projectChildAll.subscribe((v: ProjectsChild) => console.log(v)) // line1
this.projectChildAll.pipe(filter((v: ProjectsChild) => v.parentProjectId)).subscribe(v => console.log(v)) //line2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…