I have the following array:
var Set = ("BENELUX,Luxembourg,PP3a,Western_Europe,France,PP6a").split(',');
Working sequentially, I'd like to take 3 elements at a time and assign each to a variable. The result I'd like is:
var Aggreg = ["BENELUX", "Western Europe"]
var Country = ["Luxembourg", "France"]
var Product = ["PP3a", "PP6a"]
The order of elements in 'Set' will always be sequential and will always be a multiple of 3. I'm sure there's a clever, efficient way to do this. Anyone able to point me in the right direction?
["BENELUX, Western Europe"], or do you want each element as it's own string, like["BENELUX", "Western Europe"]?