title: promise mapping array of objects with array values
body: <p>Kind of lost when iterating over promises, im trying to transform this:</p>
  
  <pre><code>[{
   ' site' : ['url', 'url', 'url']
  },
  {
   ' site' : ['url', 'url', 'url']
  }]
  </code></pre>
  
  <p>so that it becomes:</p>
  
  <pre><code>[{
  'site' : [{ 'url' : result_of_function }, { 'url' : result_of_function }, { 'url' : result_of_function }]
  },
  {
    'site' : [{ 'url' : result_of_function }, { 'url' : result_of_function }, { 'url' : result_of_function }]
  }]
  </code></pre>
  
  <p>So far I created the function below, but for some reason checkBranding is not called.</p>
  
  <pre><code>function searchPageArray(brand, siteObjArr) {
  
      return Promise.map(siteObjArr, function(sitesObj){
  
      var k = Object.keys(sitesObj)[0]
      var urlArr = sitesObj[k];
  
      return Promise.map(urlArr, function(url){
  
          return searchPage(url).then(function(html){
  
              var tempObj = {}
  
              tempObj[url] = checkBranding(url, html, brand)
  
              return tempObj
  
              })
          })
  
      return sitesObj;
  
  })
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks for the help!</p>