Need some help with RXJS extraction and merging of data from observable.
[
collection: {
"id": "",
"purpose": "",
"balance": "",
"creator": "",
"dateCreated": "",
"dateUpdated": "",
"userId": "",
"schedule": [
{
"id": "",
"amount": "",
"status": "",
"type": "",
"dateCreated": "",
"dateUpdated": ""
},
{
"id": "",
"amount": "",
"status": "",
"type": "",
"dateCreated": "",
"dateUpdated": ""
},
.....
]
}
]
How do I extract all the schedule objects within each Collection parent object and combine them together as a array of Schedules? I tried using mergeMap with map. As well as forkjoin and combinedLatest. However, I still couldn't figure out the appropriate method.
It's only use "map". Think rxjs map operator like map an array. The map can be as complex you want