title: Map objects and do an api call
body: <p>I have an object that looks something like this </p>
  
  <pre><code>messageData = { items: [{name:'1st msg' draft:{contact: endpoint}},
                          {name:'1st msg' draft:{contact: endpoint}},
                          {name:'1st msg' draft:{contact: endpoint}]}
  </code></pre>
  
  <p>I need to map over the items and do an api call that expands the data from the api endpoint and return them in a table row </p>
  
  <pre><code>renderMessageTableRow() {
          let dataRef = this.state.messageData.items,
              return(_.map(dataRef, (message) =&gt; {
                  // Get vars from message data including contact method endpoint 
                  let id = message['@id'],
                      status = message.status,
                      draftData = message.draft.recipientAddress
  
                     return (
                          &lt;tr&gt;
                              &lt;td&gt;{id}&lt;/td&gt;
                              &lt;td&gt;{status}&lt;/td&gt;
                          &lt;/tr&gt;
  
                  )
              })
          )
  
  }
  </code></pre>
  
  <p>so far my function looks like this but draftData is an endpoint I need to expand and populate my table row with, I'm using React and Redux. I've been looking a libraries like async and co but not sure how I would plug this in my map function. I just need to call the endpoint make some variables from that data and populate the rest of my table with it. Any help would be much appreciated </p>