Promise.all with nested Promise.all
<p>I've nested arrays, I'm able to retrieve promises for the 2nd level array but not sure how to implement a <code>then</code> once top level finishes as well.</p>

<pre><code>result.forEach(function(entity){ // outer list ???
    return Promise.all(entity.urls.map(function(item){
        return requestURL(item.href);
    }));
});
</code></pre>

<p>for instance if <code>results</code> has two or more items and each <code>item</code> has 10 or more urls to fetch, how would we implement <code>then</code> of <code>[Promise.all][1]</code> for all the promises. Native solution please.</p>

<p>Basically to handle nested arrays of promises in a right way.</p>

<p><strong>Data Structure:</strong></p>

<pre><code>var result = [
    {
        urls: [
            {href: "link1"},
            {href: "link2"},
            {href: "link3"}
        ]
    },
    {
        urls: [
            {href: "link4"},
            {href: "link5"},
            {href: "link6"}
        ]
    }
];
</code></pre>