title: How to process an array of task asynchronously with swift combine
body: <p>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.</p>
  
  <p>First network result:</p>
  
  <pre><code>"user": {
     "id": 0,
     "items": [1, 2, 3, 4, 5]
  }
  </code></pre>
  
  <p>Final object:</p>
  
  <pre><code>struct User {
      let id: Int
      let items: [Item]
      ... other fields ...
  }
  struct Item {
      let id: Int
      ... other fields ...
  }
  </code></pre>
  
  <p>Handling multiple network calls:</p>
  
  <pre><code>userPublisher.flatMap { user in
      let itemIDs = user.items
      return Future&lt;[Item], Never&gt;() { fulfill in
          ... OperationQueue of network requests ...
      }
  }
  </code></pre>
  
  <p>I would like to perform the network requests in parallel, since they are not dependent on each other. I'm not sure if Future is right here, but I'd imagine I would then have code to do a
  DispatchGroup or OperationQueue and fulfill when they're all done. Is there more of a Combine way of doing this?</p>
  
  <p>Doe Combine have a concept of splitting one stream into many parallel streams and joining the streams together?</p>