title: Resolve all promises in an array of json - javascript
body: <p>I need to resolve all promises in an array of json, like this:</p>
  
  <pre><code>let list = [
      { 
          id: 1,
          data: new Promise((resolve, reject) =&gt; {
              resolve('Cat')
          })
      },
      { 
          id: 2,
          data: new Promise((resolve, reject) =&gt; {
              resolve('Dog')
          })
      },
      { 
          id: 3,
          data: new Promise((resolve, reject) =&gt; {
              resolve('Mouse')
          })
      }
  ]
  </code></pre>
  
  <p>I use <strong>bluebird</strong> promises.
  I used a for cycle to iterate all items, I would know if there was some way more elegant.</p>
  
  <p><strong>Expected result:</strong></p>
  
  <pre><code>[ { data: 'Cat', id: 1 },
    { data: 'Dog', id: 2 },
    { data: 'Mouse', id: 3 } ]
  </code></pre>