在 RXJS 从 observable 中提取和合并数据方面需要一些帮助。
[
collection: {
"id": "",
"purpose": "",
"balance": "",
"creator": "",
"dateCreated": "",
"dateUpdated": "",
"userId": "",
"schedule": [
{
"id": "",
"amount": "",
"status": "",
"type": "",
"dateCreated": "",
"dateUpdated": ""
},
{
"id": "",
"amount": "",
"status": "",
"type": "",
"dateCreated": "",
"dateUpdated": ""
},
.....
]
}
]
如何提取每个Collection父对象中的所有计划对象并将它们组合在一起作为Schedules数组?我尝试将mergeMap与map一起使用。以及forkjoin和combinedLatest。但是,我仍然想不出合适的方法。