How to process an array of task asynchronously with swift combine
问题 I have a publisher which takes a network call and returns an array of IDs. I now need to call another network call for each ID to get all my data. And I want the final publisher to have the resulting object. First network result: "user": { "id": 0, "items": [1, 2, 3, 4, 5] } Final object: struct User { let id: Int let items: [Item] ... other fields ... } struct Item { let id: Int ... other fields ... } Handling multiple network calls: userPublisher.flatMap { user in let itemIDs = user.items