How to extract value from an array of multiple JSON urls?

This is my attempt for your sketch:

Basically I’ve declared a global variable loads, which keeps the current number of active loadJSON().

When loads is decreased back to 0, via callback decreaseCounter(), function generateOutput() is called back.