I'm essentially looking for the JavaScript equivalent of this answer, specifically in the first format provided in that response.
In other words, given the object:
let variants = {
debug : ["on", "off"],
locale : ["de_DE", "en_US", "fr_FR"],
}
I'd like a function that returns:
[{debug: 'on', locale: 'de_DE'},
{debug: 'on', locale: 'en_US'},
{debug: 'on', locale: 'fr_FR'},
{debug: 'off', locale: 'de_DE'},
{debug: 'off', locale: 'en_US'},
{debug: 'off', locale: 'fr_FR'}]
The solution I'm looking for should be unaware of what keys are in the input object.