title: How to run promise array
body: <p>In this function, callback is called before inline array is completed. How I can call it only when inline has all values?</p>
  
  <pre><code>function inlineSearch( search, callback ) {
      const inline = []
  
      mal.quickSearch( search ).then( response =&gt; {
          response.anime.forEach( anime =&gt; {
              anime.fetch( ).then( json =&gt; {
                  inline.push( replyInline( json ) )
              })
          })
          .then( callback( inline ) )
      } )
  }
  </code></pre>
  
  <p><code>response.anime</code> is a json object array that point to another json object, that's why I need to fetch it so I can have the correct json.</p>
  
  <p>And, <code>replyInline</code> is a function that only takes the json and returns another.</p>
  
  <p><code>mal</code> = My Anime List API</p>