Get return from function and then use in promise.all()?
<p>I have three functions each of which performs a SQL query and returns me an array of data; I know this part is working because I can do a json.stringify before returning the array and it works as intended. The problem is that I need to wait until these three functions finish and then do some more stuff with them.</p>

<p>Each function I use has this same call structure:</p>

<pre><code>this.foo.makeFullJSON().then((fooStorage) =&gt; {
    fooJSON = '{foo:[' + JSON.stringify(fooStorage) + ']}';
});
</code></pre>

<p>I'm aware I should have an array of promises and then push the promises to it and then use Promise.all(), but I don't really know what part of the code I'd actually have to do that on.</p>

<p>Edit: Clearing up, each makeFullJSON() I call returns a promise ( of an array ). I need to do stuff with that resulting array.</p>