我很难弄清楚如何用一个观察点的结果来更新另一个观察点的结果:
this._http.get<JSON>(url, { params })
.pipe(map((res: JSON) => this.getObjectFromJson(res)))
.subscribe(myObject => {
this.getValueToUpdate(myObject).subscribe(newValue => {
myObject.some.value = newValue;
});
});
// return Observable<myObect>;
Rxjs运算符的正确顺序是什么,才能在没有这subscribe
的情况下实现这一点,并能够返回生成的可观测对象以供以后使用?