Can anyone help me with extracting a random array from a 2D named array? I've tried several solutions but none of them seem to work.
var sites = [];
sites['apple'] = [
'green'
,
'red'
,
'blue'
];
sites['orange'] = [
'yellow'
];
I have multiple arrays with various names and lengths, and I need to select one of them randomly. (Not individual items!)
Is there a way to achieve this?